From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D1433858D38; Sat, 18 Feb 2023 07:34:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D1433858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676705675; bh=8FSoIUWhQkr/3bcJ0lD0hiHCrcHc9hPNhQRmpFhdN6w=; h=From:To:Subject:Date:From; b=Y4W4LX3ehnk0kmvjlsFr5rOko2xaUZ/mNToGphkW24bTsB3azLHw67yqTCXl+3SLD hE68pLpDfIgXwHnAwQ7OfEPa2XstLYljGAOJasedJhqkFnVuHweDLzNe7Ef7wM+Uj8 ecLnMPsOEvPV5hz84UZM2JNvF0N/C5t1fKIBkoNs= From: "zach-gcc at cs dot stanford.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/108842] New: Cannot use enum array with -fno-druntime Date: Sat, 18 Feb 2023 07:34:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zach-gcc at cs dot stanford.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108842 Bug ID: 108842 Summary: Cannot use enum array with -fno-druntime Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: zach-gcc at cs dot stanford.edu Target Milestone: --- I have test.d: ``` enum int[] x =3D [0, 1, 2]; ``` and an object.d: ``` module object; ``` I get an error when I try to compile: ``` $ gdc -c -fno-druntime test.d test.d:1:16: error: expression '[0, 1, 2]' requires 'object.TypeInfo' and cannot be used with '-fno-rtti' 1 | enum int[] x =3D [0, 1, 2]; | ^ test.d:1:16: error: 'object.TypeInfo' could not be found, but is implicitly used 1 | enum int[] x =3D [0, 1, 2]; | ^ ``` This compiles fine with DMD and LDC with `-betterC` and the same object.d (custom runtime).=