This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/33374] New: GCC 4.1.2 produce wrong assembler code with -O2 option enabled.
- From: "_kirpichev_ at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2007 07:42:11 -0000
- Subject: [Bug c/33374] New: GCC 4.1.2 produce wrong assembler code with -O2 option enabled.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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