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

--- Comment #3 from dave.anglin at bell dot net ---
On 2023-04-12 7:31 a.m., rguenth at gcc dot gnu.org wrote:
> and the RTL for the argument is
>
> (parallel:BLK [])
>
> ick.  pa_function_arg runs into
>
> 9786      arg_size = pa_function_arg_size (mode, type);
> 9800          if (arg_size > 1)
> (gdb) p arg_size
> $7 = 0
>
> so isn't able to decipher things down to a "valid" argument spec.  Note
> above for the argument type we have TYPE_SIZE == 0 but a very
> large TYPE_SIZE_UNIT.
>
> One "obvious" mistake is to use 'int arg_size' for the HOST_WIDE_INT
> pa_function_arg_size return value.  Adjusting also downstream variable
> types helps to some extent but then we ICE in
Yes, this is wrong.  However, pa_function_arg only handles the distribution of
arguments to registers.
It's should return NULL_RTX for "large" arg_size values.  Don't know why this
didn't show up before.
>
> during RTL pass: dwarf2
> t.ii: In function 'void c(...)':
> t.ii:4:23: internal compiler error: in dwarf2out_frame_debug_expr, at
> dwarf2cfi.cc:1960
>      4 | void c(...) { c(a()); }
>        |                       ^
> 0x12bd9d2 dwarf2out_frame_debug_expr
>          /space/rguenther/src/gcc/gcc/dwarf2cfi.cc:1960
> 0x12bea15 dwarf2out_frame_debug
>          /space/rguenther/src/gcc/gcc/dwarf2cfi.cc:2367
> 0x12bf81b scan_insn_after
>          /space/rguenther/src/gcc/gcc/dwarf2cfi.cc:2726
> 0x12bfe3c scan_trace
>
> seeing
>
> (set (reg:DI 1 %r1)
>      (plus:DI (reg/f:DI 30 %r30)
>          (const_int 4611686018427379840 [0x3fffffffffffe080])))
Need to investigate where this stack adjustment comes from.

Even if we force the const_int to memory, this will never work with real
hardware.  The maximum physical
address size is 44 bits.

Reply via email to