[Bug c++/53560] New: Internal compiler error with += and void function (invalid source)

g++bug at oxyware dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 1 23:26:00 GMT 2012


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

             Bug #: 53560
           Summary: Internal compiler error with += and void function
                    (invalid source)
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: g++bug@oxyware.com


void f() {}

int main()
{
   int i = 0;
   i += f();
}

This is an invalid C++ program but it causes an internal compiler error (see
below).

g++ -v -save-temps -c <the-above> gives:

Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
Target: x86_64-unknown-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.7.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -E -quiet -v
-D_GNU_SOURCE argc.cpp -mtune=generic -march=x86-64 -fpch-preprocess -o argc.ii
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-unknown-linux-gnu

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus -fpreprocessed
argc.ii -quiet -dumpbase argc.cpp -mtune=generic -march=x86-64 -auxbase argc
-version -o argc.s
GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0, GMP version 4.3.1, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.7.0 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0, GMP version 4.3.1, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 635960e7261d0cad01689b56d992ea9a
argc.cpp: In function ‘int main()’:
argc.cpp:6:11: internal compiler error: in build_target_expr_with_type, at
cp/tree.c:587
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.



More information about the Gcc-bugs mailing list