public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115549] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute
@ 2024-06-19 11:21 iamanonymous.cs at gmail dot com
  2024-06-19 23:08 ` [Bug c/115549] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-19 11:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115549

            Bug ID: 115549
           Summary: ICE: tree check: expected tree that contains ‘decl
                    common’ structure, have ‘error_mark’ in
                    common_handle_aligned_attribute, at
                    c-family/c-attribs.cc:2665 with invalid aligned
                    attribute
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

ICE on trunk.
Compiler Explorer: https://godbolt.org/z/zcab6cfWj

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/root/gcc_set/trunk-48a320a/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/trunk-48a320a/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/trunk-48a320a
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak --enable-coverage
--disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240426 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
__attribute__((aligned, optimize(s),)0) s()

*******************************************************************************
Command Lines:
$ gcc mutant.c
mutant.c:1:34: error: ‘s’ undeclared here (not in a function)
    1 | __attribute__((aligned, optimize(s),)0) s()
      |                                  ^
mutant.c:1:38: error: expected ‘)’ before numeric constant
    1 | __attribute__((aligned, optimize(s),)0) s()
      |                                      ^
      |                                      )
mutant.c:1:1: internal compiler error: tree check: expected tree that contains
‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute,
at c-family/c-attribs.cc:2665
    1 | __attribute__((aligned, optimize(s),)0) s()
      | ^~~~~~~~~~~~~
0x25433e9 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/gcc/tree.cc:9130
0xd34731 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3770
0x10360bf common_handle_aligned_attribute
        ../../gcc/gcc/c-family/c-attribs.cc:2665
0x103692a handle_aligned_attribute
        ../../gcc/gcc/c-family/c-attribs.cc:2750
0xd2acd9 decl_attributes(tree_node**, tree_node*, int, tree_node*)
        ../../gcc/gcc/attribs.cc:900
0xd598f1 c_decl_attributes
        ../../gcc/gcc/c/c-decl.cc:5497
0xd795ab start_function(c_declspecs*, c_declarator*, tree_node*)
        ../../gcc/gcc/c/c-decl.cc:10483
0xe40891 c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.cc:2912
0xe3c6ed c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.cc:2046
0xe3bbd7 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.cc:1900
0xeccd02 c_parse_file()
        ../../gcc/gcc/c/c-parser.cc:26889
0xfe8faa c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.cc:1311
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115549] ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute
  2024-06-19 11:21 [Bug c/115549] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute iamanonymous.cs at gmail dot com
@ 2024-06-19 23:08 ` pinskia at gcc dot gnu.org
  2024-06-22 20:02 ` pinskia at gcc dot gnu.org
  2024-06-27 21:05 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-19 23:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115549

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking
           Severity|normal                      |trivial

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect r8-5161-g5d9ae53d70c729 might have introduced this.

Confirmed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115549] ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute
  2024-06-19 11:21 [Bug c/115549] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute iamanonymous.cs at gmail dot com
  2024-06-19 23:08 ` [Bug c/115549] " pinskia at gcc dot gnu.org
@ 2024-06-22 20:02 ` pinskia at gcc dot gnu.org
  2024-06-27 21:05 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-22 20:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115549

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-06-22
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
A slightly better testcase:
```
__attribute__((aligned,optimize(s)))
int s()
{

}
```

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115549] ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute
  2024-06-19 11:21 [Bug c/115549] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute iamanonymous.cs at gmail dot com
  2024-06-19 23:08 ` [Bug c/115549] " pinskia at gcc dot gnu.org
  2024-06-22 20:02 ` pinskia at gcc dot gnu.org
@ 2024-06-27 21:05 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-27 21:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115549

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655899.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-27 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 11:21 [Bug c/115549] New: ICE: tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in common_handle_aligned_attribute, at c-family/c-attribs.cc:2665 with invalid aligned attribute iamanonymous.cs at gmail dot com
2024-06-19 23:08 ` [Bug c/115549] " pinskia at gcc dot gnu.org
2024-06-22 20:02 ` pinskia at gcc dot gnu.org
2024-06-27 21:05 ` mpolacek 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).