From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Sc/6LsDvVGoyPAYAWB0awg (envelope-from ) for ; Mon, 13 Jul 2026 10:01:36 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=IVE2/EuQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B9D331E033; Mon, 13 Jul 2026 10:01:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 367E51E033 for ; Mon, 13 Jul 2026 10:01:35 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6896F4BA23CB for ; Mon, 13 Jul 2026 14:01:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6896F4BA23CB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=IVE2/EuQ Received: from BN8PR05CU002.outbound.protection.outlook.com (mail-eastus2azlp170110003.outbound.protection.outlook.com [IPv6:2a01:111:f403:c110::3]) by sourceware.org (Postfix) with ESMTPS id EFC364BA2E1D for ; Mon, 13 Jul 2026 14:00:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFC364BA2E1D Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EFC364BA2E1D Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c110::3 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783951255; cv=pass; b=YiyBI7AxSznxHp+f2czdHsgket+Q28UPoVAuE3KWm9vPPfkN9CUN9ZIeBvYTbikappMYoiN7VAlwt43d1i35S4rca3qkE7thumJSi8MPETWcYwzLm07SadA/J4pb31tqZw6Ze3lXrsOxDOJaOIcIpgQp++WVUpfQ78x6h/STYSg= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783951255; c=relaxed/simple; bh=rUJXPXV/TRo/kekyQ3az941QDW9wyd5SbnRfi7tr6jQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=p5CjKlqO5r1YWXGqydRXezABajBDD2hnxrvWp/T146Dz+ruEPUN6H+0FqZzoPCitMqdehqof+KkwnavvbTelc1yiBeDCXjUyLs3TgnaP4+PuRnz0/MNSbLHKTZbV0Ug2sAdlzpdcBgMxdKEyUFSonBdMTo+XC7xn646KOafKLUI= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=IVE2/EuQ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFC364BA2E1D ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RuoFAhNNdp0nTiBqqDPaMg3FI8H+UKIPIMZ2WFSDYVTuh1nFIsijb+Uz4XLjkXhtXA1dScsHNbHVDFQYxSh7VOoL/xTIZCRkkh+74caZV0lO6/04ZofPssW6+HHYfHjpEUq2Xjl7P6FouqdNSfGns+UnwubWuI573HiXlr5LWYC0FnuZDQSqzV9XYoNRFZcgmAH+yXe0RBzIZytfhj7ub7mvCiEhBVri2lQPMa3T2NM2z3BTMXRg7aJ92Wq7RahcwLx97N8BnRJTylRUcIkiA3zl8bw/YhGZUWjy3tu8hiajyP2zkL1l7pnhA9p0u6MbeGFf3AWOHZnTz0o/z7OdpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KfWt4S1yv1nwmf8c6lqVAhYMYwz8zeCutfV3A3qHYlM=; b=mRd+EyhFmn8iZMajkEltWgMukcQRev9sf/n4yzCuO2hDqU4KkUPHx83D2G1XUnhEAVlirRRri2ZidF4Vtucju+lPyuWR9GwEXCukwKaV34eXMK5qEVC6RL++EWimrR/b2Fgxcz7yZOmB/ne4bB8xi0i7OaADbKkM72tPlkErR5Lrkz2kr+kPRhrHTgg2ZzZCIvsnLvObFnoAzpv2zyu8kDrLsZee/sd1+M4sf198KH07/6n2bmd0OLOTgj2e3Jiy9qJguIsS4kv/Gn7R4BZDX4jtFk65UxElPmw7/D0Drnk6dn9lBsBjXrluCF8BPMlsjIbdBB4Y1b0vmE0oY7yJIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KfWt4S1yv1nwmf8c6lqVAhYMYwz8zeCutfV3A3qHYlM=; b=IVE2/EuQ0Z7bMEl9sBuqYKSmrSqtjWTGJW9eXak8Ak9UW4YW83oxtngXDfHa0RG5CtgkgVJwWOO0P/N3zG2cyInpRPvrw6J1HQ6OrBrVapN1LsVcmCHBY1TTj2t5Re68QVYJNInjkLLZK43wyVVkDVFm5B9NtI8pACc4R+KjIms= Received: from CH5PR04CA0016.namprd04.prod.outlook.com (2603:10b6:610:1f4::24) by DS0PR12MB8441.namprd12.prod.outlook.com (2603:10b6:8:123::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Mon, 13 Jul 2026 14:00:49 +0000 Received: from CH1PEPF0000AD7E.namprd04.prod.outlook.com (2603:10b6:610:1f4:cafe::4c) by CH5PR04CA0016.outlook.office365.com (2603:10b6:610:1f4::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.202.19 via Frontend Transport; Mon, 13 Jul 2026 14:00:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by CH1PEPF0000AD7E.mail.protection.outlook.com (10.167.244.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Mon, 13 Jul 2026 14:00:48 +0000 Received: from ctr-rack32-mi300x-1.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Mon, 13 Jul 2026 09:00:41 -0500 From: Tankut Baris Aktemur To: Subject: [PATCH 06/16] gdb: split make_type_with_address_space Date: Mon, 13 Jul 2026 09:00:05 -0500 Message-ID: <20260713-users-aktemur-type-instance-flags-v1-6-779cad0c85ec@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260713-users-aktemur-type-instance-flags-v1-0-779cad0c85ec@amd.com> References: <20260713-users-aktemur-type-instance-flags-v1-0-779cad0c85ec@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.15.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb08.amd.com (10.181.42.217) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD7E:EE_|DS0PR12MB8441:EE_ X-MS-Office365-Filtering-Correlation-Id: ff5de486-cea6-4e63-8d14-08dee0e724ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|23010399003|82310400026|36860700016|21046099003|18002099003|22082099003|6133799003|56012099006|11063799006|3023799007; X-Microsoft-Antispam-Message-Info: rZoRUTaHj+c7ZAr8hPwTh5GyXYDLA6mzqOVjkrPZShudsOIguQdjilM1cbEypZUkIx6bXpmke21q7mG2BXuMoT5ZdnhiVGkwcjE+UZ4Jrslc2yxZ+kf+a6kOPjUl+ji1wl6RoubAYO9sB/NvOZoKIXF3PTHGXQgUuxktQP9LqyYkcEKi7RPpPHSpTjZKNxaO77CIWZmZNvEBzGU/HcCBmn49nI3Vgx2U6VOiuliohvtHoLsHDbR0yqKi/Ld216f/agVeFS+RY5NcrJCoAhL8DjuvWY9vuqkcWtsaO+D+5KH0lUgky3erwweQ7DM0o85tTEy5gIgdOIIYpH4bpVLVAC/DwH6HjpsddeLDK51eykr4Jork+2Q3SjDpFuvL8k1uQEx6ofcZYv29N6AcTHUMpBuU6/JzGt3a8cpTAN9TzdY2BvXBAvrlScAZ8VW0iS7acotVZsXxmQnCPixRWXj6aMc9vLeO33WYzy4wBbx5Y5L/YHtOAwABr1zB6Cc6/4k/AggoSrCe2stIIjQm9cV40bfEuINNSEFy2RztiOdX054f17kOE7qgPx6TvFOojSl34VZ+Dpwi5aG7jcEjfDcQ2fOg8tMARhX0ztN+xKDsneueAz2wYmL4zZ3cTwVvg3xGCB++il/AQjtGQMO+89B0UNnESa05Ne+3dSrRWz3eqi4D1C9l4mOi2Jd1F7s4fTXMyx1hrAKdGCH2suZfonLPVA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(23010399003)(82310400026)(36860700016)(21046099003)(18002099003)(22082099003)(6133799003)(56012099006)(11063799006)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ss2TUijFc1NPPyvhTVsf4ZU6AkWbMgTZIU5c6WPIUK1rlcbGas1Sxe7NWW9XhHQKrE9X3B88j2nKdmdTfsivfuTfE3QqM88J2Z4qWo1m7CXgyRyVGKfzepPcGRY5+rj4dFQmFJQ9vqnLLRpB1F1aixbDy+bUdukLu9KdNrtssss418h/gx7JesQIzZYM7waDR/It8bNX8wB/AnAvL1XzJ9vHF+OlFh9IV3WCpMuyXk+fRpBOqpdvlR2cDrkBR+reBjlNRwO52SLXUQRGVBmd+Js66LKtD9AapmiJHSqL2AbiQ9cGG1a3xJFOzTeostpeijLhG5V9yH3A9CttRwAghnTfGegN+0ZLcfIao+K8NERFjY8ZeaN0OfYLp17edQehnMe4FGEdB4tRakca1djXBM0Ar8L/KP6fOv4pE54sSwOcVHcbmlwcyhB91NL+KfL3 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2026 14:00:48.9959 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff5de486-cea6-4e63-8d14-08dee0e724ad X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD7E.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8441 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org The function make_type_with_address_space is used for creating a type variant with a particular Harvard address space or an address class id. The argument is type instance flags. Split the function into two, each doing one task: (1) making a type variant with a given Harvard address space id, and (2) making a type variant with a given address class id. This is a step towards making function signatures clearer and more descriptive. Hardcoded shift operations ("<< 2", "<< 4", ">> 4") will go away in a future patch. --- gdb/dwarf2/read.c | 6 +----- gdb/gdbtypes.c | 42 +++++++++++++++++++++++++++++++++--------- gdb/gdbtypes.h | 14 ++++++++++++-- gdb/gnu-v3-abi.c | 2 +- gdb/printcmd.c | 13 ++++++++++++- gdb/type-stack.c | 27 +++++++++++++++++---------- 6 files changed, 76 insertions(+), 28 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 3671e39daa2..ce4d6ca8675 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -12056,11 +12056,7 @@ read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) unsigned int aclass = gdbarch_address_class_dwarf_to_id (gdbarch, byte_size, addr_class); - type_instance_flags type_flags - = (enum type_instance_flag_value) (aclass << 4); - gdb_assert ((type_flags & ~TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL) - == 0); - type = make_type_with_address_space (type, type_flags); + type = make_type_with_address_class (type, aclass); } else if (type->length () != byte_size) { diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 97f1b3e1417..205a79dfbc1 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -590,7 +590,7 @@ make_qualified_type (struct type *type, type_instance_flags new_flags, return ntype; } -/* Make an address-space-delimited variant of a type -- a type that +/* Make a Harvard-address-space-delimited variant of a type -- a type that is identical to the one supplied except that it has an address space attribute attached to it (such as "code" or "data"). @@ -600,14 +600,38 @@ make_qualified_type (struct type *type, type_instance_flags new_flags, representations. */ struct type * -make_type_with_address_space (struct type *type, - type_instance_flags space_flag) -{ - type_instance_flags new_flags = ((type->instance_flags () - & ~(TYPE_INSTANCE_FLAG_CODE_SPACE - | TYPE_INSTANCE_FLAG_DATA_SPACE - | TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL)) - | space_flag); +make_type_with_harvard_address_space (struct type *type, + enum harvard_address_space aspace) +{ + type_instance_flags new_flags + = (enum type_instance_flag_value) (aspace << 2); + + gdb_assert ((new_flags & ~(TYPE_INSTANCE_FLAG_CODE_SPACE + | TYPE_INSTANCE_FLAG_DATA_SPACE)) == 0); + new_flags |= (type->instance_flags () + & ~(TYPE_INSTANCE_FLAG_CODE_SPACE + | TYPE_INSTANCE_FLAG_DATA_SPACE)); + + return make_qualified_type (type, new_flags, NULL); +} + +/* Make an address-class-delimited variant of a type -- a type that is + identical to the one supplied except that it has an address class + attribute attached to it. The address class attribute is + architecture specific. It may denote an alternately sized pointer + or a pointer with alternate representation. */ + +struct type * +make_type_with_address_class (struct type *type, + unsigned int address_class) +{ + type_instance_flags new_flags + = (enum type_instance_flag_value) (address_class << 4); + + gdb_assert ((new_flags & ~TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL) == 0); + + new_flags |= (type->instance_flags () + & ~TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL); return make_qualified_type (type, new_flags, NULL); } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 1d5c96ab2c1..854679141ff 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -71,6 +71,13 @@ enum type_code }; +enum harvard_address_space +{ + HARVARD_ASPACE_NONE = 0, + HARVARD_ASPACE_CODE = 1, + HARVARD_ASPACE_DATA = 2, +}; + /* Some bits for the type's instance_flags word. See the macros below for documentation on each bit. */ @@ -2420,8 +2427,11 @@ extern struct type *make_atomic_type (struct type *); extern void replace_type (struct type *, struct type *); -extern struct type *make_type_with_address_space - (struct type *type, type_instance_flags space_identifier); +extern struct type *make_type_with_harvard_address_space + (struct type *type, enum harvard_address_space aspace); + +extern struct type *make_type_with_address_class + (struct type *type, unsigned int address_class); /* Implement direct support for MEMBER_TYPE in GNU C++. TO_TYPE is the type of the member. DOMAIN is the type of the aggregate that diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 35910be0f06..52e31776242 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -184,7 +184,7 @@ get_gdb_vtable_type (struct gdbarch *arch) t->set_name ("gdb_gnu_v3_abi_vtable"); INIT_CPLUS_SPECIFIC (t); - result = make_type_with_address_space (t, TYPE_INSTANCE_FLAG_CODE_SPACE); + result = make_type_with_harvard_address_space (t, HARVARD_ASPACE_CODE); vtable_type_gdbarch_data.set (arch, result); return result; } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index a337a6b7db9..3f6cfa9dde3 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1055,7 +1055,18 @@ format_to_type (format_data fmt, gdbarch *gdbarch, type_instance_flags flags) } gdb_assert (val_type != nullptr); - val_type = make_type_with_address_space (val_type, flags); + + if ((flags & TYPE_INSTANCE_FLAG_CODE_SPACE) != 0) + val_type = make_type_with_harvard_address_space (val_type, + HARVARD_ASPACE_CODE); + else if ((flags & TYPE_INSTANCE_FLAG_DATA_SPACE) != 0) + val_type = make_type_with_harvard_address_space (val_type, + HARVARD_ASPACE_DATA); + + unsigned int aclass + = (unsigned int) (flags & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL) >> 4; + if (aclass != 0) + val_type = make_type_with_address_class (val_type, aclass); return val_type; } diff --git a/gdb/type-stack.c b/gdb/type-stack.c index e2783eaab11..f49e6d05e10 100644 --- a/gdb/type-stack.c +++ b/gdb/type-stack.c @@ -72,12 +72,12 @@ type_stack::insert (struct gdbarch *gdbarch, const char *string) if (streq (string, "code")) { piece = tp_harvard_aspace_identifier; - int_val = TYPE_INSTANCE_FLAG_CODE_SPACE; + int_val = HARVARD_ASPACE_CODE; } else if (streq (string, "data")) { piece = tp_harvard_aspace_identifier; - int_val = TYPE_INSTANCE_FLAG_DATA_SPACE; + int_val = HARVARD_ASPACE_DATA; } else if (gdbarch_address_class_name_to_id_p (gdbarch) && gdbarch_address_class_name_to_id (gdbarch, @@ -85,7 +85,7 @@ type_stack::insert (struct gdbarch *gdbarch, const char *string) aclass)) { piece = tp_aclass_identifier; - int_val = (enum type_instance_flag_value) (aclass << 4); + int_val = aclass; } else error (_("Unknown address space/class specifier: \"%s\""), string); @@ -133,7 +133,8 @@ type_stack::follow_types (struct type *follow_type) int done = 0; int make_const = 0; int make_volatile = 0; - type_instance_flags make_addr_space = 0; + harvard_address_space make_harvard_aspace = HARVARD_ASPACE_NONE; + int make_address_class = 0; bool make_restrict = false; bool make_atomic = false; int array_size; @@ -152,10 +153,10 @@ type_stack::follow_types (struct type *follow_type) make_volatile = 1; break; case tp_harvard_aspace_identifier: - make_addr_space = (enum type_instance_flag_value) pop_int (); + make_harvard_aspace = (harvard_address_space) pop_int (); break; case tp_aclass_identifier: - make_addr_space = (enum type_instance_flag_value) pop_int (); + make_address_class = pop_int (); break; case tp_atomic: make_atomic = true; @@ -180,15 +181,21 @@ type_stack::follow_types (struct type *follow_type) follow_type = make_cv_type (TYPE_CONST (follow_type), make_volatile, follow_type); - if (make_addr_space) - follow_type = make_type_with_address_space (follow_type, - make_addr_space); + if (make_harvard_aspace != HARVARD_ASPACE_NONE) + follow_type + = make_type_with_harvard_address_space (follow_type, + make_harvard_aspace); + if (make_address_class != 0) + follow_type + = make_type_with_address_class (follow_type, + make_address_class); if (make_restrict) follow_type = make_restrict_type (follow_type); if (make_atomic) follow_type = make_atomic_type (follow_type); make_const = make_volatile = 0; - make_addr_space = 0; + make_harvard_aspace = HARVARD_ASPACE_NONE; + make_address_class = 0; make_restrict = make_atomic = false; break; case tp_array: -- 2.34.1