gcc 4.4.0 has a segfault ("t.c:5: internal compiler error: Segmentation fault")
when compiling the following source file, which has no includes or preprocessor
directives:

----- t.c -----
#pragma GCC optimize ("O0")
int main(void) {
    myfunc(0);
}
#pragma GCC optimize ("O2")
----- t.c -----

Compile command line: gcc -c -O2 t.c

Output of "gcc -v":

Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.4.0/configure
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++
--disable-sjlj-exceptions --enable-shared --enable-libg
cj --enable-libgomp --with-dwarf2 --disable-win32-registry
--enable-libstdcxx-debug --enable-version-specific-runtime-libs --prefix=/mingw
--with-gmp=
/mingw/src/gmp/root --with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread model: win32
gcc version 4.4.0 (GCC)


-- 
           Summary: Segmentation fault from two "#pragma GCC optimize" lines
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benhoyt at gmail dot com


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

Reply via email to