From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62EB93858D35; Tue, 22 Aug 2023 20:46:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62EB93858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692737173; bh=8wZV5+GRgofCkVu9rv3LZnu3676EhN3fmcHXw+5nbjg=; h=From:To:Subject:Date:From; b=JmJ0cGI+ioNzl0CsZYwd2RjJsZGNohvC5K0mJHZVi4QFxBqLxJJPHFLzPDre8YJI2 BTwrBy9mT4oBJYy9AXEETIoQvPWWrZ8UTZUIj95rqHZdHQBSWnxJ98q5dZoyFUpz9o pEU9S6n6VCUq9C6i0I1RDysONyKoo+T59e7EoO3E= From: "adavanian at nvidia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111104] New: Fatal error: can't fill 256 bytes in section .rodata Date: Tue, 22 Aug 2023 20:46:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adavanian at nvidia dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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 attachments.created 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=3D111104 Bug ID: 111104 Summary: Fatal error: can't fill 256 bytes in section .rodata Product: gcc Version: 12.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: adavanian at nvidia dot com Target Milestone: --- Created attachment 55777 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55777&action=3Dedit The preprocessed file that triggers the bug Compiling the following file results in a fatal error: $gcc-12 -v Using built-in specs. COLLECT_GCC=3Dgcc-12 COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: "..." Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04) $cat test.cpp struct A { int i; constexpr A() : i(0) {} }; struct B { A a[1125488619006459660]; }; extern const B b{}; $gcc-12 test.cpp -o test.bin /tmp/cc4H9Jsi.s: Assembler messages: /tmp/cc4H9Jsi.s: Fatal error: can't fill 256 bytes in section .rodata of /tmp/cc9wAeg1.o: 'file truncated' /tmp/cc4H9Jsi.s: Fatal error: /tmp/cc9wAeg1.o: file truncated Additional note: this test case is very similar to testsuite\g++.dg\cpp0x\constexpr-array.C.=