public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed
@ 2009-01-16 19:22 rguenth at gcc dot gnu dot org
2009-01-16 19:23 ` [Bug middle-end/38880] " rguenth at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-16 19:22 UTC (permalink / raw)
To: gcc-bugs
We do not fold
(long int) &16B->y - 16
--
Summary: [4.4 Regression] g++.dg/init/const7.C XFAILed
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: xfail
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
@ 2009-01-16 19:23 ` rguenth at gcc dot gnu dot org
2009-01-16 19:25 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-16 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-01-16 19:23 -------
Caused by the fix for PR36227.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-01-16 19:23:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
2009-01-16 19:23 ` [Bug middle-end/38880] " rguenth at gcc dot gnu dot org
@ 2009-01-16 19:25 ` rguenth at gcc dot gnu dot org
2009-01-16 20:37 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-16 19:25 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
2009-01-16 19:23 ` [Bug middle-end/38880] " rguenth at gcc dot gnu dot org
2009-01-16 19:25 ` rguenth at gcc dot gnu dot org
@ 2009-01-16 20:37 ` pinskia at gcc dot gnu dot org
2009-01-16 20:41 ` [Bug c++/38880] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-16 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-16 20:37 -------
((char*) &(((struct s*)16)->y) - (char *)16),
That is not a valid constant expression in C++ ....
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-01-16 20:37 ` pinskia at gcc dot gnu dot org
@ 2009-01-16 20:41 ` pinskia at gcc dot gnu dot org
2009-01-21 21:57 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-16 20:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2009-01-16 20:41 -------
http://gcc.gnu.org/ml/gcc-patches/2008-09/msg00448.html
http://gcc.gnu.org/ml/gcc-patches/2008-09/msg00581.html
Hmm, I think the front-end should be doing the trick of &16B->y into 16B + 4
just like the C front-end except in strict C++ mode.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-01-16 20:41 ` [Bug c++/38880] " pinskia at gcc dot gnu dot org
@ 2009-01-21 21:57 ` rguenth at gcc dot gnu dot org
2009-01-26 19:10 ` jason at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-21 21:57 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-01-21 21:57 ` rguenth at gcc dot gnu dot org
@ 2009-01-26 19:10 ` jason at gcc dot gnu dot org
2009-01-27 16:34 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-26 19:10 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-01-16 19:23:08 |2009-01-26 19:10:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-01-26 19:10 ` jason at gcc dot gnu dot org
@ 2009-01-27 16:34 ` rguenth at gcc dot gnu dot org
2009-01-27 23:26 ` jason at redhat dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-27 16:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-01-27 16:33 -------
Created an attachment (id=17193)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17193&action=view)
example patch
I just found this, I tried to fix this in fold but in the end agreed with
Andrew
that the C++ FE should do what the C FE does here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-01-27 16:34 ` rguenth at gcc dot gnu dot org
@ 2009-01-27 23:26 ` jason at redhat dot com
2009-01-28 10:39 ` rguenther at suse dot de
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at redhat dot com @ 2009-01-27 23:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jason at redhat dot com 2009-01-27 23:25 -------
Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
rguenth at gcc dot gnu dot org wrote:
> I just found this, I tried to fix this in fold but in the end agreed with
> Andrew that the C++ FE should do what the C FE does here.
Why do it in the FE? This seems like a language-independent optimization.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-01-27 23:26 ` jason at redhat dot com
@ 2009-01-28 10:39 ` rguenther at suse dot de
2009-01-28 16:29 ` jason at redhat dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenther at suse dot de @ 2009-01-28 10:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenther at suse dot de 2009-01-28 10:39 -------
Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
On Tue, 27 Jan 2009, jason at redhat dot com wrote:
> ------- Comment #5 from jason at redhat dot com 2009-01-27 23:25 -------
> Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
>
> rguenth at gcc dot gnu dot org wrote:
> > I just found this, I tried to fix this in fold but in the end agreed with
> > Andrew that the C++ FE should do what the C FE does here.
>
> Why do it in the FE? This seems like a language-independent optimization.
Do it in the FE if the FE wants it to be optimized to a constant.
Otherwise sure - it is a language-independent optimization. But fold
isn't a proper optimizer ;)
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (8 preceding siblings ...)
2009-01-28 10:39 ` rguenther at suse dot de
@ 2009-01-28 16:29 ` jason at redhat dot com
2009-01-28 19:44 ` rguenther at suse dot de
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at redhat dot com @ 2009-01-28 16:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at redhat dot com 2009-01-28 16:29 -------
Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
rguenther at suse dot de wrote:
>> Why do it in the FE? This seems like a language-independent optimization.
>
> Do it in the FE if the FE wants it to be optimized to a constant.
> Otherwise sure - it is a language-independent optimization. But fold
> isn't a proper optimizer ;)
I don't understand the distinction you're making; it seems to me that
reducing expressions to simpler forms that are more easily optimized is
exactly what fold is for. I don't see the difference between this and,
say, reducing "1 + 2" to "3".
The FE doesn't especially want this to be a constant; it isn't a valid
constant expression in C++, because it involves a subtraction of two
pointers.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (9 preceding siblings ...)
2009-01-28 16:29 ` jason at redhat dot com
@ 2009-01-28 19:44 ` rguenther at suse dot de
2009-02-20 5:34 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenther at suse dot de @ 2009-01-28 19:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenther at suse dot de 2009-01-28 19:44 -------
Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
On Wed, 28 Jan 2009, jason at redhat dot com wrote:
> Subject: Re: [4.4 Regression] g++.dg/init/const7.C XFAILed
>
> rguenther at suse dot de wrote:
> >> Why do it in the FE? This seems like a language-independent optimization.
> >
> > Do it in the FE if the FE wants it to be optimized to a constant.
> > Otherwise sure - it is a language-independent optimization. But fold
> > isn't a proper optimizer ;)
>
> I don't understand the distinction you're making; it seems to me that
> reducing expressions to simpler forms that are more easily optimized is
> exactly what fold is for. I don't see the difference between this and,
> say, reducing "1 + 2" to "3".
>
> The FE doesn't especially want this to be a constant; it isn't a valid
> constant expression in C++, because it involves a subtraction of two
> pointers.
I'll bootstrap / test my fold patch.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (10 preceding siblings ...)
2009-01-28 19:44 ` rguenther at suse dot de
@ 2009-02-20 5:34 ` jason at gcc dot gnu dot org
2009-02-20 5:36 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-02-20 5:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jason at gcc dot gnu dot org 2009-02-20 05:34 -------
New patch at http://gcc.gnu.org/ml/gcc-patches/2009-01/msg01309.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (11 preceding siblings ...)
2009-02-20 5:34 ` jason at gcc dot gnu dot org
@ 2009-02-20 5:36 ` jason at gcc dot gnu dot org
2009-02-23 21:24 ` jason at gcc dot gnu dot org
2009-02-24 5:15 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-02-20 5:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jason at gcc dot gnu dot org 2009-02-20 05:35 -------
Er, not that one, this one:
http://gcc.gnu.org/ml/gcc-patches/2009-02/msg00882.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (12 preceding siblings ...)
2009-02-20 5:36 ` jason at gcc dot gnu dot org
@ 2009-02-23 21:24 ` jason at gcc dot gnu dot org
2009-02-24 5:15 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-02-23 21:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jason at gcc dot gnu dot org 2009-02-23 21:24 -------
Subject: Bug 38880
Author: jason
Date: Mon Feb 23 21:23:58 2009
New Revision: 144395
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144395
Log:
PR c++/38880
* varasm.c (initializer_constant_valid_p) [PLUS_EXPR]: Check
narrowing_initializer_constant_valid_p.
(narrowing_initializer_constant_valid_p): Don't return
null_pointer_node for adding a pointer to itself.
Added:
trunk/gcc/testsuite/g++.dg/init/static-init1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/init/const7.C
trunk/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/38880] [4.4 Regression] g++.dg/init/const7.C XFAILed
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
` (13 preceding siblings ...)
2009-02-23 21:24 ` jason at gcc dot gnu dot org
@ 2009-02-24 5:15 ` jason at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-02-24 5:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jason at gcc dot gnu dot org 2009-02-24 05:14 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38880
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-02-24 5:15 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 19:22 [Bug middle-end/38880] New: [4.4 Regression] g++.dg/init/const7.C XFAILed rguenth at gcc dot gnu dot org
2009-01-16 19:23 ` [Bug middle-end/38880] " rguenth at gcc dot gnu dot org
2009-01-16 19:25 ` rguenth at gcc dot gnu dot org
2009-01-16 20:37 ` pinskia at gcc dot gnu dot org
2009-01-16 20:41 ` [Bug c++/38880] " pinskia at gcc dot gnu dot org
2009-01-21 21:57 ` rguenth at gcc dot gnu dot org
2009-01-26 19:10 ` jason at gcc dot gnu dot org
2009-01-27 16:34 ` rguenth at gcc dot gnu dot org
2009-01-27 23:26 ` jason at redhat dot com
2009-01-28 10:39 ` rguenther at suse dot de
2009-01-28 16:29 ` jason at redhat dot com
2009-01-28 19:44 ` rguenther at suse dot de
2009-02-20 5:34 ` jason at gcc dot gnu dot org
2009-02-20 5:36 ` jason at gcc dot gnu dot org
2009-02-23 21:24 ` jason at gcc dot gnu dot org
2009-02-24 5:15 ` jason at gcc dot gnu dot 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).