public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48770] New: [4.7 Regression] wrong code with -O -fprofile-arcs -fPIC -fno-dce -fno-forward-propagate -fno-tree-forwprop
@ 2011-04-26 10:31 zsojka at seznam dot cz
  2011-04-26 12:19 ` [Bug middle-end/48770] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2011-04-26 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.7 Regression] wrong code with -O -fprofile-arcs
                    -fPIC -fno-dce -fno-forward-propagate
                    -fno-tree-forwprop
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 24101
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24101
reduced testcase (from g++.dg/bprob/g++-bprob-1.C)

Compiler output:
$ rm *.gcda
$ g++ -O -fprofile-arcs -fPIC -fno-dce -fno-forward-propagate
-fno-tree-forwprop testcase.C
$ valgrind -q ./a.out
==5350== Invalid read of size 8
==5350==    at 0x400D51: test_goto2(int) (testcase.C:10)
==5350==    by 0x400D7E: main (testcase.C:14)
==5350==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
Segmentation fault

Fails only when compiled as C++ code.

Tested revisions:
r172940 - fail
4.6 r172337 - OK


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-23 21:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 10:31 [Bug middle-end/48770] New: [4.7 Regression] wrong code with -O -fprofile-arcs -fPIC -fno-dce -fno-forward-propagate -fno-tree-forwprop zsojka at seznam dot cz
2011-04-26 12:19 ` [Bug middle-end/48770] " rguenth at gcc dot gnu.org
2011-04-26 14:59 ` zsojka at seznam dot cz
2011-04-26 20:04 ` pinskia at gcc dot gnu.org
2011-05-10 11:44 ` jakub at gcc dot gnu.org
2011-05-10 12:27 ` jakub at gcc dot gnu.org
2011-05-10 13:35 ` law at redhat dot com
2011-05-10 16:29 ` law at redhat dot com
2011-06-23 21:31 ` law at gcc dot gnu.org
2011-06-23 21:32 ` law at redhat dot com

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).