http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #13 from Michael Matz matz at gcc dot gnu.org 2012-10-19 13:12:35
UTC ---
(In reply to comment #12)
What do you mean by invalid? It is certainly not undefined behavior.
No, but the expectation implicitely coded into the
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #14 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-19
13:18:12 UTC ---
I agree and do not plan to work on fixing that. (The intptr_t change is
already approved and will be comitted shortly though.)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #15 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-19
16:55:13 UTC ---
Author: mpolacek
Date: Fri Oct 19 16:53:39 2012
New Revision: 192617
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192617
Log:
PR54945
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #16 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-19
17:01:37 UTC ---
Author: mpolacek
Date: Fri Oct 19 17:00:50 2012
New Revision: 192618
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192618
Log:
PR54945
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #17 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-19
17:03:40 UTC ---
Author: mpolacek
Date: Fri Oct 19 17:03:07 2012
New Revision: 192619
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=192619
Log:
PR54945
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
Marek Polacek mpolacek at gcc dot gnu.org changed:
What|Removed |Added
Status|ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org 2012-10-18
10:15:37 UTC ---
i_6 = (intptr_t) MEM[(void *)x + 4B];
j_7 = (intptr_t) y;
_8 = i_6 == j_7;
forwprop will call fold with (intptr_t) MEM[(void *)x + 4B]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2012-10-18
10:19:20 UTC ---
(In reply to comment #6)
i_6 = (intptr_t) MEM[(void *)x + 4B];
j_7 = (intptr_t) y;
_8 = i_6 == j_7;
forwprop will call fold with
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #8 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-18
10:29:50 UTC ---
Yep, this is exactly the patch I have right now. It passed testing/bootstrap.
Will post to ML today for review.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #9 from Marek Polacek mpolacek at gcc dot gnu.org 2012-10-18
15:42:22 UTC ---
Hmm, the fix isn't enough:
int
main (void)
{
int x = 30;
int y = 31;
int *p = x + 1;
int *q = y;
return p == q;
}
$ gcc -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
Michael Matz matz at gcc dot gnu.org changed:
What|Removed |Added
CC||matz at gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org 2012-10-18
15:51:56 UTC ---
Yeah, the #c9 testcase definitely isn't valid C.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
--- Comment #12 from gcc at robbertkrebbers dot nl 2012-10-18 15:59:00 UTC ---
What do you mean by invalid? It is certainly not undefined behavior. The
pointer x + 1 is allowed by (6.5.6p8 of C11), and the equality operator
should behave as
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54945
Andrew Pinski pinskia at gcc dot gnu.org changed:
What|Removed |Added
CC||pinskia
14 matches
Mail list logo