This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/17528] New: tree optimization incorrectly optimizes away entire function (incorrect aliasing detection?)


The attached testcase (which comes from a locally modified version of the
compiler) demonstrates a case where the entire body of a function is replaced by
returning 0.

Compile attached testcase with -O2.

compiling with -fno-strict-aliasing produces correct code, but there don't
appear to be any possible alias problems with this code (and certainly no
warning is generated for that).

-- 
           Summary: tree optimization incorrectly optimizes away entire
                    function (incorrect aliasing detection?)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rearnsha at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-netbsdelf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17528


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]