re PR debug/46338 (-fcompare-debug failure (length) with -O -fprofile-generate)

PR debug/46338
* g++.dg/debug/pr46338.C: New.

From-SVN: r167263
This commit is contained in:
Alexandre Oliva 2010-11-29 19:18:24 +00:00 committed by Alexandre Oliva
parent fabfcf5e03
commit 0e160b34c6
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-11-29 Alexandre Oliva <aoliva@redhat.com>
PR debug/46338
* g++.dg/debug/pr46338.C: New.
2010-11-29 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <rakdver@kam.uniff.cz>

View File

@ -0,0 +1,24 @@
// PR debug/46338
// { dg-do compile }
// { dg-options "-O -fprofile-generate -fcompare-debug" }
void bar ();
struct S
{
int f ()
{
}
};
S *s;
void
foo (int x)
{
if (x)
return;
bar ();
for (int j = 0; j < s->f (); j++)
;
}