public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110422] New: asm goto vs SRA
@ 2023-06-27 0:02 pinskia at gcc dot gnu.org
2023-11-13 3:24 ` [Bug tree-optimization/110422] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27 0:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Bug ID: 110422
Summary: asm goto vs SRA
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Testcase from originally from PR 103979:
```
struct S { char a[64]; };
int
foo (void)
{
struct S s, t;
asm goto ("" : "=g" (s) : : : l);
t = s;
asm goto ("" : "=g" (s) : : : l);
return s.a[0] + t.a[63];
l:
return -1;
}
```
This is not related to asm goto not being volatile but rather SRA (just like
complex lowering, PR 105165) does not know how to handle `asm goto` with
outputs.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
@ 2023-11-13 3:24 ` pinskia at gcc dot gnu.org
2023-11-13 3:24 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 3:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |141242068 at smail dot nju.edu.cn
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 112503 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
2023-11-13 3:24 ` [Bug tree-optimization/110422] " pinskia at gcc dot gnu.org
@ 2023-11-13 3:24 ` pinskia at gcc dot gnu.org
2024-01-17 16:17 ` jamborm at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 3:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-11-13
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Better testcase from the dup:
```
struct T { int x; };
int foo(void) {
struct T v;
asm goto("" : "+r"(v.x) : : : lab);
return 0;
lab:
return -5;
}
```
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
2023-11-13 3:24 ` [Bug tree-optimization/110422] " pinskia at gcc dot gnu.org
2023-11-13 3:24 ` pinskia at gcc dot gnu.org
@ 2024-01-17 16:17 ` jamborm at gcc dot gnu.org
2024-01-18 13:26 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-01-17 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jamborm at gcc dot gnu.org
--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (2 preceding siblings ...)
2024-01-17 16:17 ` jamborm at gcc dot gnu.org
@ 2024-01-18 13:26 ` cvs-commit at gcc dot gnu.org
2024-01-19 9:37 ` jamborm at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-18 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:6764043e88a4208f7c69bf0ccd19ddc7a6016fb1
commit r14-8230-g6764043e88a4208f7c69bf0ccd19ddc7a6016fb1
Author: Martin Jambor <mjambor@suse.cz>
Date: Thu Jan 18 14:24:15 2024 +0100
sra: Disqualify bases of operands of asm gotos
PR 110422 shows that SRA can ICE assuming there is a single edge
outgoing from a block terminated with an asm goto. We need that for
BB-terminating statements so that any adjustments they make to the
aggregates can be copied over to their replacements. Because we can't
have that after ASM gotos, we need to punt.
gcc/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* tree-sra.cc (scan_function): Disqualify bases of operands of asm
gotos.
gcc/testsuite/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* gcc.dg/torture/pr110422.c: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (3 preceding siblings ...)
2024-01-18 13:26 ` cvs-commit at gcc dot gnu.org
@ 2024-01-19 9:37 ` jamborm at gcc dot gnu.org
2024-01-24 19:37 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-01-19 9:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed on trunk, I plan to backport to open release branches in the upcoming
weeks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (4 preceding siblings ...)
2024-01-19 9:37 ` jamborm at gcc dot gnu.org
@ 2024-01-24 19:37 ` cvs-commit at gcc dot gnu.org
2024-02-02 12:30 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-24 19:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:2b7204c52392c1c0da9c91a5feae0c44018a6f37
commit r13-8246-g2b7204c52392c1c0da9c91a5feae0c44018a6f37
Author: Martin Jambor <mjambor@suse.cz>
Date: Wed Jan 24 20:35:00 2024 +0100
sra: Disqualify bases of operands of asm gotos
PR 110422 shows that SRA can ICE assuming there is a single edge
outgoing from a block terminated with an asm goto. We need that for
BB-terminating statements so that any adjustments they make to the
aggregates can be copied over to their replacements. Because we can't
have that after ASM gotos, we need to punt.
gcc/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* tree-sra.cc (scan_function): Disqualify bases of operands of asm
gotos.
gcc/testsuite/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* gcc.dg/torture/pr110422.c: New test.
(cherry picked from commit 6764043e88a4208f7c69bf0ccd19ddc7a6016fb1)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (5 preceding siblings ...)
2024-01-24 19:37 ` cvs-commit at gcc dot gnu.org
@ 2024-02-02 12:30 ` cvs-commit at gcc dot gnu.org
2024-02-09 18:00 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-02 12:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:fda015646b9450a2147bd9f01e49e3836b724da4
commit r12-10128-gfda015646b9450a2147bd9f01e49e3836b724da4
Author: Martin Jambor <mjambor@suse.cz>
Date: Fri Feb 2 13:27:50 2024 +0100
sra: Disqualify bases of operands of asm gotos
PR 110422 shows that SRA can ICE assuming there is a single edge
outgoing from a block terminated with an asm goto. We need that for
BB-terminating statements so that any adjustments they make to the
aggregates can be copied over to their replacements. Because we can't
have that after ASM gotos, we need to punt.
gcc/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* tree-sra.cc (scan_function): Disqualify bases of operands of asm
gotos.
gcc/testsuite/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* gcc.dg/torture/pr110422.c: New test.
(cherry picked from commit 2b7204c52392c1c0da9c91a5feae0c44018a6f37)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (6 preceding siblings ...)
2024-02-02 12:30 ` cvs-commit at gcc dot gnu.org
@ 2024-02-09 18:00 ` cvs-commit at gcc dot gnu.org
2024-02-09 18:01 ` jamborm at gcc dot gnu.org
2024-02-09 19:16 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-09 18:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Martin Jambor
<jamborm@gcc.gnu.org>:
https://gcc.gnu.org/g:010e4a04c4daaf1b0dacf6aa30fcbdaa73eda33c
commit r11-11230-g010e4a04c4daaf1b0dacf6aa30fcbdaa73eda33c
Author: Martin Jambor <mjambor@suse.cz>
Date: Fri Feb 9 18:58:43 2024 +0100
sra: Disqualify bases of operands of asm gotos
PR 110422 shows that SRA can ICE assuming there is a single edge
outgoing from a block terminated with an asm goto. We need that for
BB-terminating statements so that any adjustments they make to the
aggregates can be copied over to their replacements. Because we can't
have that after ASM gotos, we need to punt.
gcc/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* tree-sra.c (scan_function): Disqualify bases of operands of asm
gotos.
gcc/testsuite/ChangeLog:
2024-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/110422
* gcc.dg/torture/pr110422.c: New test.
(cherry picked from commit 2b7204c52392c1c0da9c91a5feae0c44018a6f37)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (7 preceding siblings ...)
2024-02-09 18:00 ` cvs-commit at gcc dot gnu.org
@ 2024-02-09 18:01 ` jamborm at gcc dot gnu.org
2024-02-09 19:16 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-02-09 18:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Fixed on all opened release branches too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/110422] asm goto vs SRA
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
` (8 preceding siblings ...)
2024-02-09 18:01 ` jamborm at gcc dot gnu.org
@ 2024-02-09 19:16 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-09 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.5
Known to work| |11.4.1, 12.3.1, 13.2.1,
| |14.0
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-02-09 19:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 0:02 [Bug tree-optimization/110422] New: asm goto vs SRA pinskia at gcc dot gnu.org
2023-11-13 3:24 ` [Bug tree-optimization/110422] " pinskia at gcc dot gnu.org
2023-11-13 3:24 ` pinskia at gcc dot gnu.org
2024-01-17 16:17 ` jamborm at gcc dot gnu.org
2024-01-18 13:26 ` cvs-commit at gcc dot gnu.org
2024-01-19 9:37 ` jamborm at gcc dot gnu.org
2024-01-24 19:37 ` cvs-commit at gcc dot gnu.org
2024-02-02 12:30 ` cvs-commit at gcc dot gnu.org
2024-02-09 18:00 ` cvs-commit at gcc dot gnu.org
2024-02-09 18:01 ` jamborm at gcc dot gnu.org
2024-02-09 19:16 ` pinskia 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).