Bug 48147 - [4.7 Regression] New debug test failures
Summary: [4.7 Regression] New debug test failures
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 47819
  Show dependency treegraph
 
Reported: 2011-03-16 12:47 UTC by H.J. Lu
Modified: 2011-03-16 13:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-03-16 13:38:40


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-03-16 12:47:37 UTC
On Linux/x86, revision 171037 gave

FAIL: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto  line 16 e == 142
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -O2 -flto -flto-partition=none  line 16 e == 142

Revision 171030 is OK.
Comment 1 Jakub Jelinek 2011-03-16 13:32:05 UTC
It is a new testcase, and all the failures you mention were failing with older gccs too as well.  LTO and debug info simply has a long way to go.
Comment 2 Richard Biener 2011-03-16 13:38:40 UTC
True.  Where and how do we try to handle constant params in clones?

Quickly scanning ipa-cp.c and ipa-prop.c doesn't reveal anything.

Oh - if it is early ipa-sra.c then I'm not surprised (same issues as
early inlining probably).
Comment 3 Richard Biener 2011-03-16 13:41:28 UTC
Indeed - the linker plugin allows us to take foo() local.  The problem can
be reproduced w/o LTO with declaring foo static.  Then you get

FAIL: gcc.dg/guality/pr45882.c  -O2  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -O2  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -O2  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -O2  line 16 e == 142
FAIL: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -O3 -fomit-frame-pointer  line 16 e == 142
FAIL: gcc.dg/guality/pr45882.c  -O3 -g  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -O3 -g  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -O3 -g  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -O3 -g  line 16 e == 142
FAIL: gcc.dg/guality/pr45882.c  -Os  line 16 b == 7
FAIL: gcc.dg/guality/pr45882.c  -Os  line 16 c == 11
FAIL: gcc.dg/guality/pr45882.c  -Os  line 16 d == 112
FAIL: gcc.dg/guality/pr45882.c  -Os  line 16 e == 142

as well.  So the question is what does the testcase try to test?

If you add used to the set of attributes of foo then the testcase passes with LTO as well.

So LTO and -g works quite well ;)
Comment 4 Richard Biener 2011-03-16 13:57:33 UTC
Author: rguenth
Date: Wed Mar 16 13:57:28 2011
New Revision: 171047

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171047
Log:
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR testsuite/48147
	* gcc.dg/guality/pr45882.c: Really make sure no inlining
	or cloning happens.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/guality/pr45882.c
Comment 5 Richard Biener 2011-03-16 13:59:38 UTC
Fixed.