http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Richard Guenther changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #18 from Mikael Pettersson 2012-07-03
15:04:56 UTC ---
Right, I understood that the C test case invoked implementation-defined
behaviour, but inlining does invalidate any assumptions it might have made.
Attaching an "__attribute__((_
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #17 from Andreas Schwab 2012-07-03 14:05:06
UTC ---
When the call to find_stack_direction is inlined into itself there is no
requirement on how the two instances of here are allocated, so their addresses
have no defined relative order
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #16 from Andrew Pinski 2012-07-03
13:09:01 UTC ---
The code as written might be considered as undefined.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #15 from Mikael Pettersson 2012-07-03
09:56:33 UTC ---
Created attachment 27734
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27734
cleaned up test case
This cleaned up version of the small C test case should be free of any
tec
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #14
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #13 from Rafał Mużyło 2012-07-02 20:25:12
UTC ---
As I said, it might not be related, but it's a bit odd, that both gcc versions
agree *and* it's also about inlining.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Mikael Pettersson changed:
What|Removed |Added
CC||mikpe at it dot uu.se
--- Comment #12
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #11 from Rafał Mużyło 2012-07-02 19:38:29
UTC ---
OK, I don't know if it's related, but
https://bugs.gentoo.org/show_bug.cgi?id=424475
and its follow-up
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11845
This code:
int
find_stack_di
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #10 from Rafał Mużyło 2012-06-18 11:13:20
UTC ---
Now, for an interesting note:
if instead of 'string test(n);' I put 'printf("%d\n", n);', not only the bug
*still* happens, but the result if funny:
first a '0' gets printed, but after
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #9 from Rafał Mużyło 2012-06-18 10:43:50
UTC ---
The code is not mine and it's about as convoluted (if not more) as freeciv was
(that was the *initial* part of bug 39333 - the upstream workaround was
http://svn.gna.org/viewcvs/freeciv
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #8 from Richard Guenther 2012-06-18
10:04:36 UTC ---
Btw, when removing the 'string test(n)' line the function gets inlined and
eliminated, so that is not of much help.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #7 from Richard Guenther 2012-06-18
09:58:58 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > The wrong code here seems to be 'n' treated as a constant - there was a bug
> > (regarding freeciv, IIRC) of a similar case f
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #6 from Richard Guenther 2012-06-18
09:58:04 UTC ---
(In reply to comment #5)
> The wrong code here seems to be 'n' treated as a constant - there was a bug
> (regarding freeciv, IIRC) of a similar case for an older gcc version.
>
> A
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #5 from Rafał Mużyło 2012-06-18 09:46:17
UTC ---
The wrong code here seems to be 'n' treated as a constant - there was a bug
(regarding freeciv, IIRC) of a similar case for an older gcc version.
As for gcc 4.6.4, when will it be rele
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Richard Guenther changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Rafał Mużyło changed:
What|Removed |Added
Attachment #27643|0 |1
is obsolete|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #2 from Rafał Mużyło 2012-06-17 13:05:20
UTC ---
Created attachment 27643
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27643
preprocessed sources triggering the bug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
--- Comment #1 from Rafał Mużyło 2012-06-17 13:03:27
UTC ---
Created attachment 27642
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27642
-Wall warnings
Attaching '-Wall' warnings for completeness.
Note, that gcc 4.7.1 generates good code
19 matches
Mail list logo