On Fri, Jan 13, 2023 at 04:38:00PM +0100, Jakub Jelinek via Gcc-patches wrote:
> I'm seeing
> +FAIL: g++.target/aarch64/bitfield-abi-warning-align16-O2.C 
> scan-assembler-times and\\tw0, w1, 1 10
> +FAIL: g++.target/aarch64/bitfield-abi-warning-align32-O2.C 
> scan-assembler-times and\\tw0, w1, 1 10
> +FAIL: g++.target/aarch64/bitfield-abi-warning-align8-O2.C 
> scan-assembler-times and\\tw0, w0, 1 11
> +FAIL: g++.target/aarch64/bitfield-abi-warning-align8-O2.C 
> scan-assembler-times and\\tw0, w1, 1 18

The above seems only because I'm testing with 

> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_128.c -march=armv8.2-a+sve 
> (internal compiler error: in aarch64_layout_arg, at 
> config/aarch64/aarch64.cc:7696)
> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_128.c -march=armv8.2-a+sve (test 
> for excess errors)
> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_256.c -march=armv8.2-a+sve 
> (internal compiler error: in aarch64_layout_arg, at 
> config/aarch64/aarch64.cc:7696)
> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_256.c -march=armv8.2-a+sve (test 
> for excess errors)
> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_512.c -march=armv8.2-a+sve 
> (internal compiler error: in aarch64_layout_arg, at 
> config/aarch64/aarch64.cc:7696)
> +FAIL: gcc.target/aarch64/sve/pcs/struct_3_512.c -march=armv8.2-a+sve (test 
> for excess errors)
> regressions with this change.

But these I can reproduce using a cross compiler on current trunk:
#0  fancy_abort (file=0x2da73c0 "../../gcc/config/aarch64/aarch64.cc", 
line=7710, function=0x2da8917 "aarch64_layout_arg") at 
../../gcc/diagnostic.cc:2219
#1  0x0000000001a8756b in aarch64_layout_arg (pcum_v=..., arg=...) at 
../../gcc/config/aarch64/aarch64.cc:7710
#2  0x0000000001a88477 in aarch64_function_arg_advance (pcum_v=..., arg=...) at 
../../gcc/config/aarch64/aarch64.cc:8023
#3  0x000000000107cb17 in gimplify_parameters (cleanup=0x7fffffffd8c0) at 
../../gcc/function.cc:3929
#4  0x0000000001156366 in gimplify_body (fndecl=<function_decl 0x7fffe985b900 
sel2_pst_uniform4>, do_parms=true) at ../../gcc/gimplify.cc:17619
#5  0x0000000001156ca0 in gimplify_function_tree (fndecl=<function_decl 
0x7fffe985b900 sel2_pst_uniform4>) at ../../gcc/gimplify.cc:17822
#6  0x0000000000ea2402 in cgraph_node::analyze (this=<cgraph_node * const 
0x7fffe985f220 "sel2_pst_uniform4"/39>) at ../../gcc/cgraphunit.cc:676
#7  0x0000000000ea4489 in analyze_functions (first_time=true) at 
../../gcc/cgraphunit.cc:1240
#8  0x0000000000ea7a06 in symbol_table::finalize_compilation_unit 
(this=0x7fffea38b000) at ../../gcc/cgraphunit.cc:2547
#9  0x0000000001572df1 in compile_file () at ../../gcc/toplev.cc:471
#10 0x0000000001575caf in do_compile (no_backend=false) at 
../../gcc/toplev.cc:2125
#11 0x0000000001576078 in toplev::main (this=0x7fffffffdc6a, argc=14, 
argv=0x7fffffffdd98) at ../../gcc/toplev.cc:2277
#12 0x0000000002a81c6a in main (argc=14, argv=0x7fffffffdd98) at 
../../gcc/main.cc:39

alignment is 256, which is not <= 16 * BITS_PER_UNIT.
type is pst_uniform4 with user alignment of 32 bytes:
struct pst_uniform4
{
  fixed_int32_t a __attribute__((aligned(SVE_BYTES * 2)));
  fixed_int32_t b[3] __attribute__((aligned(SVE_BYTES * 2)));
  fixed_int32_t c __attribute__((aligned(SVE_BYTES * 2)));
};
and with -march=armv8.2-a+sve -msve-vector-bits=128
__ARM_FEATURE_SVE_BITS and therefore SVE_BYTES is 128 and so
the alignment seems requested.

        Jakub

Reply via email to