public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
@ 2011-04-04 21:58 hjl.tools at gmail dot com
2011-04-04 22:05 ` [Bug middle-end/48440] " hjl.tools at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-04-04 21:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
Summary: [4.7 Regression] FAIL:
gcc.c-torture/compile/labels-3.c
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: matz@gcc.gnu.org
Revision 171903:
http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg00095.html
breaks gcc.c-torture/compile/labels-3.c for targets where
Pmode == DImode and ptr_mode == SImode like x32. Revert
* cgraphbuild.c (record_reference): Canonicalize constructor
values.
fixes the regression.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
@ 2011-04-04 22:05 ` hjl.tools at gmail dot com
2011-04-04 22:16 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-04-04 22:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-04-04 22:05:30 UTC ---
The record_reference change remove the cast, which is needed for
Pmode != ptr_mode:
diff -upr bad/x.i.143r.expand good/x.i.143r.expand
--- bad/x.i.143r.expand 2011-04-04 15:02:05.652458274 -0700
+++ good/x.i.143r.expand 2011-04-04 15:02:55.233678782 -0700
@@ -5,7 +5,7 @@ foo (int a)
{
void * gotovar.0;
void * p;
- static const short int ar[2] = {0, (short unsigned int) &l2 - (short
unsigned int) &l1};
+ static const short int ar[2] = {0, (short int) ((short unsigned int) (int)
&l2 - (short unsigned int) (int) &l1)};
int D.2689;
unsigned int D.2688;
const short int D.2687;
@@ -105,7 +105,7 @@ foo (int a)
{
void * gotovar.0;
void * p;
- static const short int ar[2] = {0, (short unsigned int) &l2 - (short
unsigned int) &l1};
+ static const short int ar[2] = {0, (short int) ((short unsigned int) (int)
&l2 - (short unsigned int) (int) &l1)};
int D.2689;
unsigned int D.2688;
const short int D.2687;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
2011-04-04 22:05 ` [Bug middle-end/48440] " hjl.tools at gmail dot com
@ 2011-04-04 22:16 ` hjl.tools at gmail dot com
2011-04-05 0:51 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-04-04 22:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-04-04 22:15:54 UTC ---
This patch:
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 3948cf6..c80d7ab 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -56,7 +56,10 @@ record_reference (tree *tp, int *walk_subtrees, void *data)
t = canonicalize_constructor_val (t);
if (!t)
t = *tp;
- else if (t != *tp)
+ else if (t != *tp
+ && !(Pmode != ptr_mode
+ && TREE_CODE (t) == ADDR_EXPR
+ && TREE_CODE (*tp) == CONVERT_EXPR))
*tp = t;
switch (TREE_CODE (t))
seems to work.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
2011-04-04 22:05 ` [Bug middle-end/48440] " hjl.tools at gmail dot com
2011-04-04 22:16 ` hjl.tools at gmail dot com
@ 2011-04-05 0:51 ` hjl.tools at gmail dot com
2011-04-05 11:06 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-04-05 0:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-04/msg00281.htm
| |l
Target Milestone|--- |4.7.0
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-04-05 00:51:43 UTC ---
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2011-04/msg00281.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-04-05 0:51 ` hjl.tools at gmail dot com
@ 2011-04-05 11:06 ` rguenth at gcc dot gnu.org
2011-04-08 0:23 ` hjl at gcc dot gnu.org
2011-10-10 11:44 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-05 11:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-05 11:02:50 UTC ---
- static const short int ar[2] = {0, (short unsigned int) &l2 - (short
unsigned int) &l1};
+ static const short int ar[2] = {0, (short int) ((short unsigned int) (int)
&l2 - (short unsigned int) (int) &l1)};
this transformation is completely reasonable for any pointer size. The
bug must be elsewhere and latent.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-04-05 11:06 ` rguenth at gcc dot gnu.org
@ 2011-04-08 0:23 ` hjl at gcc dot gnu.org
2011-10-10 11:44 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-04-08 0:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-04-08 00:23:05 UTC ---
Author: hjl
Date: Fri Apr 8 00:23:02 2011
New Revision: 172156
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172156
Log:
Properly get inner mode for constant op0.
2011-04-06 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/48440
* expr.c (expand_expr_real_2): Get inner mode from op0 instead
of treeop0 for constant op0.
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/expr.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/48440] [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-04-08 0:23 ` hjl at gcc dot gnu.org
@ 2011-10-10 11:44 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48440
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-10 11:44:14 UTC ---
Invalid thus.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-10 11:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 21:58 [Bug middle-end/48440] New: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c hjl.tools at gmail dot com
2011-04-04 22:05 ` [Bug middle-end/48440] " hjl.tools at gmail dot com
2011-04-04 22:16 ` hjl.tools at gmail dot com
2011-04-05 0:51 ` hjl.tools at gmail dot com
2011-04-05 11:06 ` rguenth at gcc dot gnu.org
2011-04-08 0:23 ` hjl at gcc dot gnu.org
2011-10-10 11:44 ` rguenth at gcc dot gnu.org
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).