* [Bug middle-end/100898] [9/10/11/12 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
@ 2021-06-04 13:30 ` jakub at gcc dot gnu.org
2021-06-04 13:57 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-04 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE with -O2: in |[9/10/11/12 Regression] ICE
|gimple_call_arg_ptr, at |with -O2: in
|gimple.h:3264 |gimple_call_arg_ptr, at
| |gimple.h:3264
Keywords| |ice-checking,
| |ice-on-valid-code
Component|c |middle-end
CC| |jakub at gcc dot gnu.org
Version|tree-ssa |12.0
Last reconfirmed| |2021-06-04
Ever confirmed|0 |1
Target Milestone|--- |9.5
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started to ICE with most likely
r0-88576-g726a989a8b74bf238a96029860bcf7ba14eff317
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10/11/12 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
2021-06-04 13:30 ` [Bug middle-end/100898] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
@ 2021-06-04 13:57 ` jakub at gcc dot gnu.org
2021-06-07 7:26 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-04 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50927
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50927&action=edit
gcc12-pr100898.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10/11/12 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
2021-06-04 13:30 ` [Bug middle-end/100898] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-06-04 13:57 ` jakub at gcc dot gnu.org
@ 2021-06-07 7:26 ` cvs-commit at gcc dot gnu.org
2021-06-07 7:37 ` [Bug middle-end/100898] [9/10/11 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-07 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:d66a703c8ba86f3ca04cc10c3071696e6d014de6
commit r12-1255-gd66a703c8ba86f3ca04cc10c3071696e6d014de6
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Jun 7 09:25:37 2021 +0200
tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]
The following testcase ICEs, because gimple_call_arg_ptr (..., 0)
asserts that there is at least one argument, while we were using
it even if we didn't copy anything just to get a pointer from/to which
the zero arguments should be copied.
Fixed by guarding the memcpy calls. Also, the code was calling
gimple_call_num_args too many times - 5 times instead of 2, so the patch
adds two temporaries for those.
2021-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/100898
* tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
should copy any arguments. Don't call gimple_call_num_args
on id->call_stmt or call_stmt more than once.
* g++.dg/ext/va-arg-pack-3.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10/11 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (2 preceding siblings ...)
2021-06-07 7:26 ` cvs-commit at gcc dot gnu.org
@ 2021-06-07 7:37 ` jakub at gcc dot gnu.org
2021-06-07 9:07 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-07 7:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11/12 Regression] ICE |[9/10/11 Regression] ICE
|with -O2: in |with -O2: in
|gimple_call_arg_ptr, at |gimple_call_arg_ptr, at
|gimple.h:3264 |gimple.h:3264
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far. Less important on release branches, since they
aren't checking by default, but still worth fixing there.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10/11 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (3 preceding siblings ...)
2021-06-07 7:37 ` [Bug middle-end/100898] [9/10/11 " jakub at gcc dot gnu.org
@ 2021-06-07 9:07 ` rguenth at gcc dot gnu.org
2021-06-17 5:59 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-07 9:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10/11 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (4 preceding siblings ...)
2021-06-07 9:07 ` rguenth at gcc dot gnu.org
@ 2021-06-17 5:59 ` cvs-commit at gcc dot gnu.org
2021-06-17 7:59 ` [Bug middle-end/100898] [9/10 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-17 5:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:d9f75e8a73b1b69b8f709b56296b4a9751c50ef0
commit r11-8589-gd9f75e8a73b1b69b8f709b56296b4a9751c50ef0
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Jun 7 09:25:37 2021 +0200
tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]
The following testcase ICEs, because gimple_call_arg_ptr (..., 0)
asserts that there is at least one argument, while we were using
it even if we didn't copy anything just to get a pointer from/to which
the zero arguments should be copied.
Fixed by guarding the memcpy calls. Also, the code was calling
gimple_call_num_args too many times - 5 times instead of 2, so the patch
adds two temporaries for those.
2021-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/100898
* tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
should copy any arguments. Don't call gimple_call_num_args
on id->call_stmt or call_stmt more than once.
* g++.dg/ext/va-arg-pack-3.C: New test.
(cherry picked from commit d66a703c8ba86f3ca04cc10c3071696e6d014de6)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (5 preceding siblings ...)
2021-06-17 5:59 ` cvs-commit at gcc dot gnu.org
@ 2021-06-17 7:59 ` jakub at gcc dot gnu.org
2022-05-10 8:18 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-17 7:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE |[9/10 Regression] ICE with
|with -O2: in |-O2: in
|gimple_call_arg_ptr, at |gimple_call_arg_ptr, at
|gimple.h:3264 |gimple.h:3264
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.2 too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (6 preceding siblings ...)
2021-06-17 7:59 ` [Bug middle-end/100898] [9/10 " jakub at gcc dot gnu.org
@ 2022-05-10 8:18 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:20 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:34 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:fb6579667cd87bc41afbd81b876e8e571712d289
commit r10-10616-gfb6579667cd87bc41afbd81b876e8e571712d289
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Jun 7 09:25:37 2021 +0200
tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]
The following testcase ICEs, because gimple_call_arg_ptr (..., 0)
asserts that there is at least one argument, while we were using
it even if we didn't copy anything just to get a pointer from/to which
the zero arguments should be copied.
Fixed by guarding the memcpy calls. Also, the code was calling
gimple_call_num_args too many times - 5 times instead of 2, so the patch
adds two temporaries for those.
2021-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/100898
* tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
should copy any arguments. Don't call gimple_call_num_args
on id->call_stmt or call_stmt more than once.
* g++.dg/ext/va-arg-pack-3.C: New test.
(cherry picked from commit d66a703c8ba86f3ca04cc10c3071696e6d014de6)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (7 preceding siblings ...)
2022-05-10 8:18 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:20 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:34 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 6:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:97785bcbc66b11f41030a459f7b170f1e2ed5e50
commit r9-10075-g97785bcbc66b11f41030a459f7b170f1e2ed5e50
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Jun 7 09:25:37 2021 +0200
tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]
The following testcase ICEs, because gimple_call_arg_ptr (..., 0)
asserts that there is at least one argument, while we were using
it even if we didn't copy anything just to get a pointer from/to which
the zero arguments should be copied.
Fixed by guarding the memcpy calls. Also, the code was calling
gimple_call_num_args too many times - 5 times instead of 2, so the patch
adds two temporaries for those.
2021-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/100898
* tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
should copy any arguments. Don't call gimple_call_num_args
on id->call_stmt or call_stmt more than once.
* g++.dg/ext/va-arg-pack-3.C: New test.
(cherry picked from commit d66a703c8ba86f3ca04cc10c3071696e6d014de6)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/100898] [9/10 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
2021-06-04 3:34 [Bug c/100898] New: ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264 cnsun at uwaterloo dot ca
` (8 preceding siblings ...)
2022-05-11 6:20 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:34 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-11 6:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100898
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread