From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 80ACC3858D32; Fri, 10 Mar 2023 16:09:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80ACC3858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678464578; bh=4LiC2idclP8DqEC7nAlib0IbSG1/uX3Q/6qSSRaf0vg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cl8DttK9yaNfvITnlMInrAInUIhETbssDsoVeX96kyftkw6NN/dSkUsI8odKWyrWO K6D22jBc+JUkyJUJPVMllRy8HYkjJMrZXh9sFKusbenPFrf7fyV54QYrgrkM2fw9Z2 nT2jSe1AQZ1CtRtQXNqG2XLNYEIgCXSdCL8FOCeg= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108910] [12/13 Regression] Further ICE in aarch64_layout_arg Date: Fri, 10 Mar 2023 16:09:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108910 --- Comment #11 from Jakub Jelinek --- To be exact, it is more complicated than that. Some types with extra types are created using build_variant_type_copy and so their TYPE_MAIN_VARIANT is without the attributes. Example is handle_aligned_attribute -> common_handle_aligned_attribute -> build_variant_type_copy. Others are created as build_distinct_type_copy and don't have TYPE_MAIN_VAR= IANT without it, e.g. build_type_attribute_variant -> build_type_attribute_qual_variant -> build_distinct_type_copy. Compare e.g. the #c0 testcase vs. extern void foo (float, float *, float *); void bar (void *p) { typedef float *FP; typedef FP FP2 __attribute__((aligned (64))); FP2 q =3D __builtin_assume_aligned (p, 64); foo (0.0f, q, q); } which doesn't ICE. #0 build_distinct_type_copy (type=3D) at ../../gcc/tree.cc:5693 #1 0x0000000000c143bb in build_type_attribute_qual_variant (otype=3D, attribute=3D, quals=3D0) at ../../gcc/attribs.cc:1298 #2 0x0000000000c156f0 in build_type_attribute_variant (ttype=3D, attribute=3D) at ../../gcc/attribs.cc:1591 #3 0x0000000000c13465 in decl_attributes (node=3D0x7fffffffd1f8, attributes=3D, flags=3D1, last_decl=3D)= at ../../gcc/attribs.cc:964 #4 0x0000000000c32a69 in grokdeclarator (declarator=3D0x3716e40, declspecs=3D0x3716cc0, decl_context=3DNORMAL, initialized=3Dtrue, width=3D0= x0, decl_attrs=3D0x7fffffffd3d0,=20 expr=3D0x7fffffffd3f0, expr_const_operands=3D0x7fffffffd1ef, deprecated_state=3DDEPRECATED_NORMAL) at ../../gcc/c/c-decl.cc:6967 #5 0x0000000000c2d270 in start_decl (declarator=3D0x3716e70, declspecs=3D0x3716cc0, initialized=3Dtrue, attributes=3D, do_push= =3Dtrue, lastloc=3D0x0) at ../../gcc/c/c-decl.cc:5364 on #c0 while this one: #1 0x000000000191494b in build_variant_type_copy (type=3D) at ../../gcc/tree.cc:5727 #2 0x0000000000dbaeba in common_handle_aligned_attribute (node=3D0x7ffffff= fd270, name=3D, args=3D, flags=3D0,=20 no_add_attrs=3D0x7fffffffd28f, warn_if_not_aligned_p=3Dfalse) at ../../gcc/c-family/c-attribs.cc:2386 #3 0x0000000000dbb633 in handle_aligned_attribute (node=3D0x7fffffffd270, name=3D, args=3D, flags=3D0,=20 no_add_attrs=3D0x7fffffffd28f) at ../../gcc/c-family/c-attribs.cc:2499 #4 0x0000000000c12dcd in decl_attributes (node=3D0x7fffffffd3f8, attributes=3D, flags=3D0, last_decl=3D)= at ../../gcc/attribs.cc:878 #5 0x0000000000c2d1bc in c_decl_attributes (node=3D0x7fffffffd3f8, attributes=3D, flags=3D0) at ../../gcc/c/c-decl.c= c:5323 #6 0x0000000000c2d699 in start_decl (declarator=3D0x3716f60, declspecs=3D0x3716ea0, initialized=3Dfalse, attributes=3D, do_push=3Dtrue, lastloc=3D0x7fffffffd584) at ../../gcc/c/c-decl.cc:5460=