public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manfred99 at gmx dot ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/33638] New: optimization bug: wrong code with -fforce-addr Date: Wed, 03 Oct 2007 12:44:00 -0000 [thread overview] Message-ID: <bug-33638-9562@http.gcc.gnu.org/bugzilla/> (raw) I have a rather nasty optimization issue with gfortran (as of yesterday). As I think it could be an optimization issue and not an gfortran frontend issue, so I assigned it to the middle-end. I narrowed my problem to one single fortran function. If I compile this function with "gfortran -O2 -march=pentium4" the output is OK, using "gfortran -O2 -march=pentium4 -fforce-addr" produces wrong output. When reducing optimization level to "-O1", the issue vanishes for all tried flag combinations. If I comment out a particular non-functional line in this code, the issue goes away: if (always_true) then .... else this_line_commented_out_makes_it_working_again .... endif I will add assembler output of original, non-working code as well as of working code when commenting the non-functional line, both compiled with "gfortran -O2 -march=pentium4 -fforce-addr -S comunpack.f" Function code is added as well. Further data points: - output of -fdump-tree-optimized is the same for both the working and the broken case (of the original function, not the line commenting test). - there are differences in assembler output though. - the code calls C functions. - I could reproduce this issue on an different, non-pentium4 machine using the same flags. - the flag -march=pentium4 is necessary to trigger the issue. -- Summary: optimization bug: wrong code with -fforce-addr Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: manfred99 at gmx dot ch http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33638
next reply other threads:[~2007-10-03 12:44 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-10-03 12:44 manfred99 at gmx dot ch [this message] 2007-10-03 12:46 ` [Bug middle-end/33638] " manfred99 at gmx dot ch 2007-10-03 12:47 ` manfred99 at gmx dot ch 2007-10-03 12:49 ` manfred99 at gmx dot ch 2007-10-03 15:43 ` ubizjak at gmail dot com 2007-10-03 20:11 ` manfred99 at gmx dot ch 2007-10-04 6:48 ` ubizjak at gmail dot com 2007-10-05 9:36 ` manfred99 at gmx dot ch 2007-10-05 9:39 ` manfred99 at gmx dot ch 2007-10-05 10:47 ` [Bug rtl-optimization/33638] [4.3 regression]: " ubizjak at gmail dot com 2007-10-05 11:40 ` ubizjak at gmail dot com 2007-10-05 11:50 ` zadeck at naturalbridge dot com 2007-10-05 12:36 ` rguenth at gcc dot gnu dot org 2007-10-05 13:03 ` zadeck at naturalbridge dot com 2007-10-05 17:50 ` kargl at gcc dot gnu dot org 2007-10-05 20:16 ` rguenth at gcc dot gnu dot org 2007-10-05 20:17 ` zadeck at naturalbridge dot com 2007-10-06 6:49 ` ubizjak at gmail dot com 2007-10-06 12:27 ` zadeck at naturalbridge dot com 2007-10-06 13:07 ` zadeck at naturalbridge dot com 2007-10-06 19:59 ` ubizjak at gmail dot com 2007-10-06 21:20 ` zadeck at naturalbridge dot com 2007-10-08 8:56 ` ubizjak at gmail dot com 2007-10-08 12:16 ` ubizjak at gmail dot com 2007-10-08 12:35 ` Kenneth dot Zadeck at NaturalBridge dot com 2007-10-11 5:33 ` ebotcazou at gcc dot gnu dot org 2007-10-11 5:39 ` [Bug rtl-optimization/33638] [4.3 regression] wrong code with -O2 -fforce-addr ebotcazou at gcc dot gnu dot org 2007-10-11 5:48 ` ubizjak at gmail dot com 2007-10-12 15:28 ` manfred99 at gmx dot ch
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-33638-9562@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).