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

            Bug ID: 124146
           Summary: [14/15/16 Regression] ICE in
                    aarch64_function_arg_alignment
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

long a;
void *b;
char c;

long
foo (void *)
{
  typedef __attribute__((__aligned__)) __attribute__((__may_alias__)) unsigned
long T;
  a = *(T *) b;
  return a;
}

void
bar (unsigned long)
{
  long d = foo (&c);
  bar (d);
}

ICEs with -O1 in
during RTL pass: expand
rh2440395.ii: In function ‘void bar(long unsigned int)’:
rh2440395.ii:17:7: internal compiler error: in aarch64_function_arg_alignment,
at config/aarch64/aarch64.cc:7502
   17 |   bar (d);
      |   ~~~~^~~
0x3079808 internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x3088113 fancy_abort(char const*, int, char const*)
        ../../gcc/diagnostics/context.cc:1812
0x1834c4a aarch64_function_arg_alignment
        ../../gcc/config/aarch64/aarch64.cc:7502
0x1835966 aarch64_layout_arg
        ../../gcc/config/aarch64/aarch64.cc:7865
0x18365fc aarch64_function_arg
        ../../gcc/config/aarch64/aarch64.cc:8116
0xac8cbe initialize_argument_information
        ../../gcc/calls.cc:1554
0xacd3fd expand_call(tree_node*, rtx_def*, int)
        ../../gcc/calls.cc:3041

Reply via email to