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

            Bug ID: 112339
           Summary: ICE with namespaced attribute on function
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: s_gccbugzilla at nedprod dot com
  Target Milestone: ---

This, if compiled with trunk GCC or any recent major version of GCC:

```
[[clang::no_sanitize("bounds")]] void foo() 
{
}
```

... with options `-Wno-attributes=clang::no_sanitize -fsanitize=undefined`
produces ICE:

```
<source>: In function 'void foo()':
<source>:3:1: internal compiler error: in tree_to_uhwi, at tree.cc:6469
    3 | }
      | ^
0x266430e internal_error(char const*, ...)
        ???:0
0xb01c2c fancy_abort(char const*, int, char const*)
        ???:0
0xb97938 cp_genericize(tree_node*)
        ???:0
0xbe33ef finish_function(bool)
        ???:0
0xcebe49 c_parse_file()
        ???:0
0xe2ceb9 c_common_parse_file()
        ???:0
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.
Compiler returned: 1
```

Godbolt demo: https://godbolt.org/z/hs3xqeqn1

Reply via email to