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

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).