https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
Martin Jambor changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #14 from CVS Commits ---
The releases/gcc-9 branch has been updated by Martin Jambor
:
https://gcc.gnu.org/g:7dd5b92bbe0944dc27e6175b0df72ed0a7188016
commit r9-9852-g7dd5b92bbe0944dc27e6175b0df72ed0a7188016
Author: Martin Jambor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #13 from CVS Commits ---
The releases/gcc-10 branch has been updated by Martin Jambor
:
https://gcc.gnu.org/g:d2ecc42195e8af1992d12e678e761c73557eaf56
commit r10-10318-gd2ecc42195e8af1992d12e678e761c73557eaf56
Author: Martin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #12 from CVS Commits ---
The releases/gcc-11 branch has been updated by Martin Jambor
:
https://gcc.gnu.org/g:5e2e6cc84c46ff7ceb6395c0309a2c6b71d83cb1
commit r11-9347-g5e2e6cc84c46ff7ceb6395c0309a2c6b71d83cb1
Author: Martin Jambor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #11 from CVS Commits ---
The master branch has been updated by Martin Jambor :
https://gcc.gnu.org/g:e5440bc08e07fd491dcccd47e1b86a5985ee117c
commit r12-5633-ge5440bc08e07fd491dcccd47e1b86a5985ee117c
Author: Martin Jambor
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #10 from Martin Jambor ---
I have proposed a patch to address this issue in:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585756.html
Well, it prevents the infinite loop testcase from segfaulting when the
function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #9 from hubicka at kam dot mff.cuni.cz ---
> @@ -1,4 +1,3 @@
> -static int
> __attribute__ ((noinline,const))
> infinite (int p)
> {
Just for a record, it crahes with or without static int here for me :)
I run across it because
> @@ -1,4 +1,3 @@
> -static int
> __attribute__ ((noinline,const))
> infinite (int p)
> {
Just for a record, it crahes with or without static int here for me :)
I run across it because the code tracking must access in ipa-sra is IMO
conceptually wrong. I noticed that because ipa-modref solves
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #8 from Martin Liška ---
(In reply to hubicka from comment #6)
> Aha, but here is better example (reproduces same way).
> In the former one I forgot const attribute which makes it invalid.
> The testcase tests that ipa-sra is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
Martin Liška changed:
What|Removed |Added
Status|WAITING |NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #7 from Martin Liška ---
Now, I can reproduce it, the original code snippet was different:
diff -u pr103267-o.c pr103267.c
--- pr103267-o.c2021-11-16 09:47:41.463349286 +0100
+++ pr103267.c 2021-11-16 09:47:11.811550854
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #6 from hubicka at kam dot mff.cuni.cz ---
Aha, but here is better example (reproduces same way).
In the former one I forgot const attribute which makes it invalid.
The testcase tests that ipa-sra is missing ECF_LOOPING_CONST_OR_PURE
Aha, but here is better example (reproduces same way).
In the former one I forgot const attribute which makes it invalid.
The testcase tests that ipa-sra is missing ECF_LOOPING_CONST_OR_PURE
check
static int
__attribute__ ((noinline))
infinite (int p)
{
if (p)
while (1);
return p;
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #5 from hubicka at kam dot mff.cuni.cz ---
Works for me even with the 3 warnings.
hubicka@lomikamen:/aux/hubicka/trunk/build-lto2/gcc$ cat >tt.c
__attribute__ ((noinline,const))
infinite (int p)
{
if (p)
while (1);
return p;
Works for me even with the 3 warnings.
hubicka@lomikamen:/aux/hubicka/trunk/build-lto2/gcc$ cat >tt.c
__attribute__ ((noinline,const))
infinite (int p)
{
if (p)
while (1);
return p;
}
__attribute__ ((noinline))
static void
test(int p, int *a)
{
int v = infinite (p);
if (*a && v)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #4 from Martin Liška ---
Still, I can't reproduce with the current master.
Apparently, the code snippet from #c0 produces only 2 warnings:
$ gcc pr103267.c -c -O2 && ./a.out
pr103267.c:17:1: warning: return type defaults to ‘int’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #3 from Martin Liška ---
Ah, ok, so no ICE, but wrong code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
--- Comment #2 from Jan Hubicka ---
jan@localhost:~> gcc t.c
t.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | infinite (int p)
| ^~~~
t.c:16:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
16 |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103267
Martin Liška changed:
What|Removed |Added
Last reconfirmed||2021-11-16
19 matches
Mail list logo