public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes
@ 2024-09-04 15:58 pinskia at gcc dot gnu.org
  2024-09-04 16:03 ` [Bug target/116598] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-04 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116598
           Summary: gcc.dg/c23-attr-reproducible-1.c and
                    gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to
                    searching for attributes
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: aarch64-sme, testsuite-fail
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

Reduced testcase:
```
int f12 (long long *y) [[reproducible]] {}
```

The ICE and backtrace:
```
t.c: In function ‘f12’:
t.c:1:1: internal compiler error: Segmentation fault
    1 | int f12 (long long *y) [[reproducible]] {}
      | ^~~
0x324ec50 internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:492
0x176a3ca crash_signal
        ../../gcc/toplev.cc:321
0xda07bf tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/tree.h:3632
0x1c5bbbf aarch64_lookup_shared_state_flags
        ../../gcc/config/aarch64/aarch64.cc:600
0x1c6079f aarch64_fntype_shared_flags
        ../../gcc/config/aarch64/aarch64.cc:2197
0x1c607be aarch64_fntype_pstate_za
        ../../gcc/config/aarch64/aarch64.cc:2206
0x1c609ab aarch64_fndecl_pstate_za
        ../../gcc/config/aarch64/aarch64.cc:2266
0x1c609d6 aarch64_fndecl_isa_mode
        ../../gcc/config/aarch64/aarch64.cc:2276
0x1c917db aarch64_set_current_function
        ../../gcc/config/aarch64/aarch64.cc:19142
0x1254cdc invoke_set_current_function_hook
        ../../gcc/function.cc:4692
0x1255039 allocate_struct_function(tree_node*, bool)
        ../../gcc/function.cc:4815
0xdcc501 store_parm_decls()
        ../../gcc/c/c-decl.cc:11320
0xe3cff0 c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.cc:2990
0xe3aa1c c_parser_external_declaration
        ../../gcc/c/c-parser.cc:2060
0xe3a4a8 c_parser_translation_unit
        ../../gcc/c/c-parser.cc:1914
0xe8f637 c_parse_file()
        ../../gcc/c/c-parser.cc:27337
0xf3badc c_common_parse_file()
        ../../gcc/c-family/c-opts.cc:1315
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.

```

Looks like the issue is when reproducible is not added due to the pointer but
the attribute is still there.

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

* [Bug target/116598] gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes
  2024-09-04 15:58 [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes pinskia at gcc dot gnu.org
@ 2024-09-04 16:03 ` pinskia at gcc dot gnu.org
  2024-09-04 21:07 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-04 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-09-04
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The problem is simple aarch64_lookup_shared_state_flags does NOT handle
attributes in the global namespace. It thinks all cxx11_attribute_p attributes
have a namespace associated with them but in this case, reproducible does NOT.

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

* [Bug target/116598] gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes
  2024-09-04 15:58 [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes pinskia at gcc dot gnu.org
  2024-09-04 16:03 ` [Bug target/116598] " pinskia at gcc dot gnu.org
@ 2024-09-04 21:07 ` pinskia at gcc dot gnu.org
  2024-09-06 12:49 ` cvs-commit at gcc dot gnu.org
  2024-09-06 12:49 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-04 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2024-Septemb
                   |                            |er/662297.html
           Keywords|                            |patch

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662297.html

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

* [Bug target/116598] gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes
  2024-09-04 15:58 [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes pinskia at gcc dot gnu.org
  2024-09-04 16:03 ` [Bug target/116598] " pinskia at gcc dot gnu.org
  2024-09-04 21:07 ` pinskia at gcc dot gnu.org
@ 2024-09-06 12:49 ` cvs-commit at gcc dot gnu.org
  2024-09-06 12:49 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-09-06 12:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:1247fa6e95cdf4a6422ec802f733f1f7ecaa3557

commit r15-3517-g1247fa6e95cdf4a6422ec802f733f1f7ecaa3557
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Sep 4 09:06:53 2024 -0700

    aarch64: Use is_attribute_namespace_p and get_attribute_name inside
aarch64_lookup_shared_state_flags [PR116598]

    The code in aarch64_lookup_shared_state_flags all C++11 attributes on the
function type
    had a namespace associated with them. But with the addition of
reproducible/unsequenced,
    this is not true.

    This fixes the issue by using is_attribute_namespace_p instead of manually
figuring out
    the namespace is named "arm" and uses get_attribute_name instead of
manually grabbing
    the attribute name.

    Built and tested for aarch64-linux-gnu.

    gcc/ChangeLog:

            PR target/116598
            * config/aarch64/aarch64.cc (aarch64_lookup_shared_state_flags):
Use
            is_attribute_namespace_p and get_attribute_name instead of manually
grabbing
            the namespace and name of the attribute.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

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

* [Bug target/116598] gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes
  2024-09-04 15:58 [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-09-06 12:49 ` cvs-commit at gcc dot gnu.org
@ 2024-09-06 12:49 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-06 12:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |15.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-09-06 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-04 15:58 [Bug target/116598] New: gcc.dg/c23-attr-reproducible-1.c and gcc.dg/c23-attr-unsequenced-1.c ICEs on aarch64 due to searching for attributes pinskia at gcc dot gnu.org
2024-09-04 16:03 ` [Bug target/116598] " pinskia at gcc dot gnu.org
2024-09-04 21:07 ` pinskia at gcc dot gnu.org
2024-09-06 12:49 ` cvs-commit at gcc dot gnu.org
2024-09-06 12:49 ` pinskia 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).