g++ -O1 -fprofile-generate gcc-bug/test-case.ii 
gcc-bug/test-case.cpp: In function ‘int f(const int*)’:
gcc-bug/test-case.cpp:14: error: address taken, but ADDRESSABLE bit not set
D.27568
gcc-bug/test-case.cpp:14: note: in statement
D.27611 = &D.27568;

gcc-bug/test-case.cpp:14: internal compiler error: verify_stmts failed

It is very simple code that I have used in C++ for a long time.

Like this:
std::copy(&array[0], &array[5], ostream_iterator<int>(cout, "\n");

I accidentally built GCC 4.5.0 from SVN instead of 4.4 (it branched when I
wasn't looking) and hit this bug.

It only seems to happen with optimization and profile generation. -O1
-fprofile-generate will trigger it.  -O3 without profiling will not.

I have not tried to reproduce with GCC 4.4 or GCC 4.5 on i686 or x86_64.

Preprocessed source will be attached.


-- 
           Summary: -fprofile-generate -O1: ICE: verify_stmts failed,
                    ADDRESSABLE bit not set on pointers passed to std::copy
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zlynx at acm dot org
  GCC host triplet: ia64-redhat-linux


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

Reply via email to