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 c/33374] New: GCC 4.1.2 produce wrong assembler code with -O2 option enabled.


I use gcc 4.1.2 under solaris and linux and compile code using next commands:
Linux:
gcc -pipe -Wall -Wextra -Winvalid-pch -ansi -pedantic -Wundef -Wc++-compat
-Wfloat-equal -Wredundant-decls -Waggregate-return -Wbad-function-cast
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wcast-align
-Wshadow -Wsign-compare -Wnested-externs -Wcast-qual -Wpointer-arith
-Wdeclaration-after-statement -Werror -O2 -finline-functions
-Wdisabled-optimization -DNDEBUG test.c -o mtest_l

Solaris:
gcc -pipe -Wall -Wextra -Winvalid-pch -ansi -pedantic -Wundef -Wc++-compat
-Wfloat-equal -Wredundant-decls -Waggregate-return -Wbad-function-cast
-Wstrict-prototypes -Wcast-align -Wshadow -Wsign-compare -Wnested-externs
-Wcast-qual -Wpointer-arith -Wdeclaration-after-statement -Werror -O2
-finline-functions -Wdisabled-optimization -DNDEBUG -g -o mtest test.c

Segmentation fault happens when I try to run test program (see test.c
attached).


-- 
           Summary: GCC 4.1.2 produce wrong assembler code with -O2 option
                    enabled.
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: _kirpichev_ at mail dot ru


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


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