public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dick_guertin at yahoo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/25791] New: -O2 execution fails using 3.4.4, -O and -g work Date: Sun, 15 Jan 2006 07:02:00 -0000 [thread overview] Message-ID: <bug-25791-12018@http.gcc.gnu.org/bugzilla/> (raw) ~> which gcc /usr/pubsw/bin/gcc elaine:~> gcc -v Reading specs from /afs/ir.stanford.edu/systems/@sys/pubsw/package/Languages/gcc-3.4.4/sun4x_58/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.4/specs Configured with: ../../gcc-3.4.4/configure --datadir=/lib --libexecdir=/lib --sharedstatedir=/lib --prefix=/usr/pubsw --enable-threads --with-gnu-as --with-as=/usr/pubsw/bin/as --with-gnu-ld --with-ld=/usr/pubsw/bin/ld --with-libintl- prefix=/usr/pubsw --with-libiconv-prefix=/usr/pubsw Thread model: posix gcc version 3.4.4 vine:~> gcc -v Reading specs from /afs/ir.stanford.edu/systems/i386_linux24/pubsw/package/Languages/gcc-3.4.4/i386_linux24/bin/../lib/gcc/i686-pc-linux-gnu/3.4.4/specs Configured with: ../../gcc-3.4.4/configure --datadir=/lib --libexecdir=/lib --sharedstatedir=/lib --prefix=/usr/pubsw --enable-threads --with-gnu-as --with-as=/usr/pubsw/bin/as --with-gnu-ld --with-ld=/usr/pubsw/bin/ld --with-libintl- prefix=/usr/pubsw --with-libiconv-prefix=/usr/pubsw Thread model: posix gcc version 3.4.4 This 'bug' appeared with the introduction of version 3.4.4. On all other platforms, the code compiles and executes properly. This includes Mac OSX on a G3 and G4, RedHat Linux on i386, and Solaris on Sun's sparc. This code is also shared between another i486 and sparc machine, as shown above. I deleted all objects (.o), and created a new Makefile using 'xmkmf' with an Imakefile. I then compile and built the target program with 'make'. The Makefile had -O2 optimization by default (created by xmkmf). When I tried to execute the target program, it failed, as follows: (gdb) run Starting program: /afs/ir.stanford.edu/users/g/u/guertin/wylsrc/wylbur.ge Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) where #0 0x00000000 in ?? () #1 0x0021ff6c in rlookup () #2 0x0021fbd8 in nscan () #3 0x00223778 in NSCAN () #4 0x00026d9c in EDTBASE () #5 0x000277c0 in EDTCOM () #6 0x00224348 in signon () #7 0x0001c418 in startpw () #8 0x00102070 in main () I started over, deleted all objects, and changed -O2 to -O in the Makefile. This version compiled and executed properly. The same was true when I tried -g in place of -O or -O2. So -O2 code fails to execute properly, but -O code works just fine. This same behaviour occurred on BOTH the i486 and sparc machines. The program is rather large: subdirectory 1: 1 .c, 1 .h subdirectory 2: 16 .c, 22 .h subdirectory 3: 6 .c, 11 .h maindir: 58 .c, 142 .h The program is 3353608 bytes in size on sparc. The program is 2928714 bytes in size on i486. An example of where -O2 code compiles and executes PROPERLY is: liblin1 $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-39) But on the i486 and sparc machines listed at the beginning, -O2 code fails to execute properly. -- Summary: -O2 execution fails using 3.4.4, -O and -g work Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dick_guertin at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25791
next reply other threads:[~2006-01-15 7:02 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-01-15 7:02 dick_guertin at yahoo dot com [this message] 2006-01-15 10:01 ` [Bug c/25791] -O2 execution fails, " ebotcazou at gcc dot gnu dot org 2006-01-16 23:16 ` dick_guertin at yahoo dot com 2006-01-16 23:20 ` [Bug rtl-optimization/25791] " pinskia at gcc dot gnu dot org 2006-01-17 1:19 ` dick_guertin at yahoo dot com 2006-01-17 4:35 ` dick_guertin at yahoo dot com 2006-01-17 6:59 ` ebotcazou at gcc dot gnu dot org 2006-01-17 8:33 ` dick_guertin at yahoo dot com 2006-01-17 8:47 ` ebotcazou at gcc dot gnu dot org 2006-01-17 19:01 ` dick_guertin at yahoo dot com 2006-01-17 20:55 ` dick_guertin at yahoo dot com 2006-01-18 3:10 ` dick_guertin at yahoo dot com 2006-01-18 13:31 ` ebotcazou at gcc dot gnu dot org 2006-01-18 13:38 ` ebotcazou at gcc dot gnu dot org 2006-01-19 4:00 ` dick_guertin at yahoo dot com 2006-01-19 4:04 ` pinskia at gcc dot gnu dot org 2006-01-19 4:50 ` dick_guertin at yahoo dot com 2006-01-19 6:41 ` dick_guertin at yahoo dot com 2006-01-19 6:51 ` pinskia at gcc dot gnu dot org 2006-01-19 6:55 ` ebotcazou at gcc dot gnu dot org 2006-01-19 7:46 ` dick_guertin at yahoo dot com 2006-01-19 8:26 ` dick_guertin at yahoo dot com 2006-01-19 8:39 ` ebotcazou at gcc dot gnu dot org 2006-01-19 12:16 ` pinskia at gcc dot gnu dot org 2006-01-19 17:54 ` dick_guertin at yahoo dot com 2006-01-19 18:23 ` dick_guertin at yahoo dot com 2006-01-19 18:33 ` ebotcazou at gcc dot gnu dot org 2006-01-21 8:17 ` dick_guertin at yahoo dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-25791-12018@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).