public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
@ 2021-07-31 0:40 anbu1024.me at gmail dot com
2021-08-02 8:30 ` [Bug c/101702] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: anbu1024.me at gmail dot com @ 2021-07-31 0:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Bug ID: 101702
Summary: [12 Regression] ICE: in handle_argspec_attribute, at
c-family/c-attribs.c:3623
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: anbu1024.me at gmail dot com
Target Milestone: ---
$ cat 44.c
double foo(double x[!__builtin_copysignf(~2, 3)]);
double bar(double x)
{
return foo(x);
}
----------------------------------------------------------------
$ gcc-sp12 --version
gcc (GCC) 12.0.0 20210718 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------------------------------------------------------
$ gcc-sp12 44.c
44.c:2:1: internal compiler error: in handle_argspec_attribute, at
c-family/c-attribs.c:3623
2 | double foo(double x[!__builtin_copysignf(~2, 3)]);
| ^~~~~~
0x69526e handle_argspec_attribute
../../gcc-12-20210718/gcc/c-family/c-attribs.c:3623
0x873fcc decl_attributes(tree_node**, tree_node*, int, tree_node*)
../../gcc-12-20210718/gcc/attribs.c:720
0x891fc2 push_parm_decl(c_parm const*, tree_node**)
../../gcc-12-20210718/gcc/c/c-decl.c:5903
0x8e9a39 c_parser_parms_list_declarator
../../gcc-12-20210718/gcc/c/c-parser.c:4291
0x8e9d88 c_parser_parms_declarator
../../gcc-12-20210718/gcc/c/c-parser.c:4217
0x8e1e48 c_parser_direct_declarator_inner
../../gcc-12-20210718/gcc/c/c-parser.c:4130
0x8ee858 c_parser_declaration_or_fndef
../../gcc-12-20210718/gcc/c/c-parser.c:2148
0x8f7773 c_parser_external_declaration
../../gcc-12-20210718/gcc/c/c-parser.c:1777
0x8f81b9 c_parser_translation_unit
../../gcc-12-20210718/gcc/c/c-parser.c:1650
0x8f81b9 c_parse_file()
../../gcc-12-20210718/gcc/c/c-parser.c:22121
0x957cbd c_common_parse_file()
../../gcc-12-20210718/gcc/c-family/c-opts.c:1223
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
----------------------------------------------------------------
$ gcc-sp11 --version
gcc (GCC) 11.1.1 20210717
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------------------------------------------------------
$ gcc-sp11 44.c
44.c: In function ‘bar’:
44.c:6:14: error: incompatible type for argument 1 of ‘foo’
6 | return foo(x);
| ^
| |
| double
44.c:2:19: note: expected ‘double *’ but argument is of type ‘double’
2 | double foo(double x[!__builtin_copysignf(~2, 3)]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
@ 2021-08-02 8:30 ` rguenth at gcc dot gnu.org
2021-08-02 15:28 ` msebor at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-02 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Keywords| |ice-on-invalid-code
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
2021-08-02 8:30 ` [Bug c/101702] " rguenth at gcc dot gnu.org
@ 2021-08-02 15:28 ` msebor at gcc dot gnu.org
2021-08-02 17:02 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-08-02 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-02
Ever confirmed|0 |1
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The ICE was introduced in g:98f1f9f38c45218c06200feb1939c9433a2ab6ca.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
2021-08-02 8:30 ` [Bug c/101702] " rguenth at gcc dot gnu.org
2021-08-02 15:28 ` msebor at gcc dot gnu.org
@ 2021-08-02 17:02 ` jakub at gcc dot gnu.org
2021-10-15 2:38 ` cnsun at uwaterloo dot ca
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-08-02 17:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
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 51244
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51244&action=edit
gcc12-pr101702.patch
Untested fix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (2 preceding siblings ...)
2021-08-02 17:02 ` jakub at gcc dot gnu.org
@ 2021-10-15 2:38 ` cnsun at uwaterloo dot ca
2021-11-15 12:17 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-10-15 2:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Chengnian Sun <cnsun at uwaterloo dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cnsun at uwaterloo dot ca
--- Comment #3 from Chengnian Sun <cnsun at uwaterloo dot ca> ---
A possible duplicate.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.gzh6IUhxke-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211014 (experimental) [master -gee9fa8a57] (GCC)
$ cat mutant.c
baz4(int[(int)+1.0]) {}
$ gcc-trunk mutant.c
mutant.c:1:1: internal compiler error: in handle_argspec_attribute, at
c-family/c-attribs.c:3654
1 | baz4(int[(int)+1.0]) {}
| ^~~~
0x6cba3d handle_argspec_attribute
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c-family/c-attribs.c:3654
0x936c35 decl_attributes(tree_node**, tree_node*, int, tree_node*)
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/attribs.c:715
0x954efc push_parm_decl(c_parm const*, tree_node**)
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-decl.c:5927
0x99de49 c_parser_parms_list_declarator
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:4297
0x99e1bc c_parser_parms_declarator
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:4223
0x996820 c_parser_direct_declarator_inner
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:4136
0x9b37b5 c_parser_declaration_or_fndef
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:2154
0x9bd933 c_parser_external_declaration
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:1780
0x9be39b c_parser_translation_unit
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:1653
0x9be39b c_parse_file()
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c/c-parser.c:23222
0xa20db5 c_common_parse_file()
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/c-family/c-opts.c:1237
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (3 preceding siblings ...)
2021-10-15 2:38 ` cnsun at uwaterloo dot ca
@ 2021-11-15 12:17 ` jakub at gcc dot gnu.org
2021-11-15 17:00 ` msebor at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-15 12:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|jakub at gcc dot gnu.org |unassigned at gcc dot gnu.org
Status|ASSIGNED |NEW
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Martin clearly prefers some other fix, so I'll let him fix it himself.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (4 preceding siblings ...)
2021-11-15 12:17 ` jakub at gcc dot gnu.org
@ 2021-11-15 17:00 ` msebor at gcc dot gnu.org
2021-11-17 0:37 ` msebor at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-11-15 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (5 preceding siblings ...)
2021-11-15 17:00 ` msebor at gcc dot gnu.org
@ 2021-11-17 0:37 ` msebor at gcc dot gnu.org
2021-11-17 18:53 ` cvs-commit at gcc dot gnu.org
2021-11-17 18:53 ` msebor at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-11-17 0:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Martin clearly prefers some other fix, so I'll let him fix it himself.
I think I just misread your change. It doesn't cause the problem I was
concerned about. I've submitted a slightly enhanced version that avoids
additional problems here:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584658.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (6 preceding siblings ...)
2021-11-17 0:37 ` msebor at gcc dot gnu.org
@ 2021-11-17 18:53 ` cvs-commit at gcc dot gnu.org
2021-11-17 18:53 ` msebor at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-17 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:2c2148d8c144d7388abcb7c34b782be647fe81c9
commit r12-5347-g2c2148d8c144d7388abcb7c34b782be647fe81c9
Author: Martin Sebor <msebor@redhat.com>
Date: Wed Nov 17 11:51:33 2021 -0700
Handle folded nonconstant array bounds [PR101702]
PR c/101702 - ICE: in handle_argspec_attribute, at
c-family/c-attribs.c:3623
gcc/c/ChangeLog:
PR c/101702
* c-decl.c (get_parm_array_spec): Strip casts earlier and fold
array
bounds before deciding if they're constant.
gcc/testsuite/ChangeLog:
PR c/101702
* gcc.dg/Warray-parameter-11.c: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/101702] [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
` (7 preceding siblings ...)
2021-11-17 18:53 ` cvs-commit at gcc dot gnu.org
@ 2021-11-17 18:53 ` msebor at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-11-17 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101702
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-11-17 18:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31 0:40 [Bug c/101702] New: [12 Regression] ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623 anbu1024.me at gmail dot com
2021-08-02 8:30 ` [Bug c/101702] " rguenth at gcc dot gnu.org
2021-08-02 15:28 ` msebor at gcc dot gnu.org
2021-08-02 17:02 ` jakub at gcc dot gnu.org
2021-10-15 2:38 ` cnsun at uwaterloo dot ca
2021-11-15 12:17 ` jakub at gcc dot gnu.org
2021-11-15 17:00 ` msebor at gcc dot gnu.org
2021-11-17 0:37 ` msebor at gcc dot gnu.org
2021-11-17 18:53 ` cvs-commit at gcc dot gnu.org
2021-11-17 18:53 ` msebor 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).