From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id 9BD563858D3C; Sat, 29 Jun 2024 01:28:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BD563858D3C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BD563858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719624540; cv=none; b=WwHl9cDlZ4ugCxK9hwvLKp4R2IzMiliZargfoxz5THJQuWdWuzY6rlNSI+4UZ+vXNpgul/RsNG4K6bXIQAulEB57QkqlNJiyx98rO0c2cOcwQ/riayBSz/QzwkZmBaLmZcXY3GJgBi7GcrCc3gZ515DPoO9/Efdt75n9A25YHDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719624540; c=relaxed/simple; bh=lQqsX+tsmjM49dTQJ8VRmV0hcJpMlA+td06H4gMFwFc=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=Qh2fFKZYeIL4TyN2TPSXN4FQ2a4Iq0J73JIIyT7QWNp3DtFTiMEbogxoJs1k1MkntSCwPrfPWkWFaSdhFWt8E/J6+OnFc+UUV4tZA6RlLLW7P3gGL3t/nxXHWVbtZ5LL1YzQXTgXF29mCOsSMJQVsQWpXeMswRZKo8m9nFLjGY0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-64ad8d7b804so10542817b3.0; Fri, 28 Jun 2024 18:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1719624538; x=1720229338; darn=gcc.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5HQUUejP0kDzC7wsoSYTjQS+B+0DZ5hkDMrFdM2Ma4U=; b=J7uhJyBLyKYXpbKdNpCRMGSkWQapJDEhModLQXQWlun6aRbtzPMOMr7Ts8I9OcI3Gs GFYJYJ3hrhKDbO2SPSKHQSP+iWFWtaE354jLWiqbajBEAiGY04tBpqwJlkzVv7Bj3I4L 385sxy23vkklJYyebdKVdxXPb4xQpf7R/rr7OoOLrDmRFuy0KAZabV63G7A4oMuPy8IG gRkNJYMfL7qiMGaF3i3IssR1FVnno+c6dbQj7biVKs6e8c6gMw2kBtM+0ACtB9VfCG1y PGG2DSaKeWhgnAaT9UsnJXpin7LeML/tEoi/yB2YrgEPYgAaa3DYEyg7uvp2cYIOzmFa YkJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719624538; x=1720229338; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5HQUUejP0kDzC7wsoSYTjQS+B+0DZ5hkDMrFdM2Ma4U=; b=QehPBQFGFIDfoZfN+cuAGyowsadi5nz9VX0ddrDTlYQCvd4RGUGOxWzuNNfS+517B+ iLrWkx0cQktplTMPChuqHU8Z3/MJf3QMhipz7YTeCH/impWCz1IBjlvNYEQd392OkuXp DRE6sKDTd4bJTujojEdi92mIP2uppxuaERKizUiucPkiOLdbSUKYGDdMDjSNR1tOoSfe o3+HugLdNUhIa8T37C/jcOaKuwYt77r9sljoWeloAhX+V2ciKw+Mg2/JnV8cpNkq2Z+d rgemz7mpgeFN5RbkVjuYmwkqtKWjW4iKuAANB60o4vdxKV250ymJ0nLJqIXS6gEisBo5 CFRg== X-Forwarded-Encrypted: i=1; AJvYcCXAAvfbpAMCFHVh4j4jTD8IU0C0jX6aFzcJWWHNaY0FNmH7TJecMClkwM8UVGGIKkFcRXxuJweZl2xBFID2g7FhMVKZz5dfzQr7JtJ6tLAHm3Do+i14uLvT X-Gm-Message-State: AOJu0Yw6jPu9CqQ7jt6B+wxmwG6H0gHVFXuHm9D/c0Olql47lRUE34aU qKh8WH3P5hGXzd3qhw/yJkamxGw8HzyF8yrUiSIkN6hLDYh352qN X-Google-Smtp-Source: AGHT+IFHFOCfFaaouVg6GPeVx0ocZ2CC/977h7AHvqXFRTL0jTxiCL8VgDstxmy2WwArYS/8fz0VSw== X-Received: by 2002:a25:8212:0:b0:e02:b3b7:2cf9 with SMTP id 3f1490d57ef6-e035bf90e75mr2256749276.24.1719624537833; Fri, 28 Jun 2024 18:28:57 -0700 (PDT) Received: from smtpclient.apple (syn-068-188-119-174.biz.spectrum.com. [68.188.119.174]) by smtp.googlemail.com with ESMTPSA id 3f1490d57ef6-e0353d79b69sm509100276.20.2024.06.28.18.28.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2024 18:28:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: [PATCH] libgccjit: Add ability to get the alignment of a type From: Iain Sandoe In-Reply-To: Date: Sat, 29 Jun 2024 02:28:56 +0100 Cc: David Malcolm , Antoni Boucher , GCC Patches , "jit@gcc.gnu.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <0f5dc195-1148-4a70-b730-18eaa8ba4000@zoho.com> To: Rainer Orth X-Mailer: Apple Mail (2.3696.120.41.1.8) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Folks, > On 28 Jun 2024, at 12:50, Rainer Orth = wrote: >=20 > David Malcolm writes: >=20 >> On Thu, 2024-04-04 at 18:59 -0400, Antoni Boucher wrote: >>> Hi. >>> This patch adds a new API to produce an rvalue representing the=20 >>> alignment of a type. >>> Thanks for the review. >>=20 >> Patch looks good to me (but may need the usual ABI version updates = when >> merging). >=20 > This patch broke macOS bootstrap: >=20 > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc: In member = function 'virtual gcc::jit::recording::string* = gcc::jit::recording::memento_of_typeinfo::make_debug_string()':=20 > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc:5529:30: error: = 'ident' may be used uninitialized [-Werror=3Dmaybe-uninitialized] > 5529 | return string::from_printf (m_ctxt, > | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~ > 5530 | "%s (%s)", > | ~~~~~~~~~~ > 5531 | ident, > | ~~~~~~ > 5532 | m_type->get_debug_string ()); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc:5519:15: note: = 'ident' was declared here > 5519 | const char* ident; > | ^~~~~ >=20 > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc: In member = function 'virtual void = gcc::jit::recording::memento_of_typeinfo::write_reproducer(gcc::jit::repro= ducer&)': =20 > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc:5552:11: error: = 'type' may be used uninitialized [-Werror=3Dmaybe-uninitialized] > 5552 | r.write (" gcc_jit_rvalue *%s =3D\n" > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ > 5553 | " gcc_jit_context_new_%sof (%s, /* gcc_jit_context *ctxt = */\n" > | = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 5554 | " (gcc_jit_type *) %s); /* = gcc_jit_type *type */\n", > | = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~ > 5555 | id, > | ~~~ > 5556 | type, > | ~~~~~ > 5557 | r.get_identifier (get_context ()), > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 5558 | r.get_identifier (m_type)); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~ > /vol/gcc/src/hg/master/darwin/gcc/jit/jit-recording.cc:5541:15: note: = 'type' was declared here > 5541 | const char* type; > | ^~~~ >=20 > I wonder how this can have worked anywhere (apart from jit not being > enabled by default on non-Darwin targets). Well, in principle, all values of the m_info_type enum are covered = (there are only 2) - and therefore the two vars should be seen as = initialized on some path. It is quite disappointing that we cannot = track this in a 12 line function with such a small enumeration=E2=80=A6=20= =E2=80=A6 I am going to fix this with the obvious (provide a default = init for the vars) - later today. Iain