From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E3E563858C62; Sat, 25 Nov 2023 07:34:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3E563858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700897680; bh=7eGB4ZSJ0NMc0fshMX8E3UUdyqhdCb0e3JwJ81H9Qcg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rJ4epGqw32R/eX1l65+Q0zG+4j+8dx/TV0P8EarxjToU6raK6onPlm6wliswZEewI Ku4o2xdOXy2SNY9g7dSFtl7/lb+mmzcSMMgzW4DPoXqDSukbWxKG1OL/kbzx+zbAUR lJyqvFnoCVZamxKXxY7IQvqZsyddzsl6McNFyBzk= From: "alexhenrie24 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111107] i686-w64-mingw32 does not realign stack when __attribute__((aligned)) or __attribute__((vector_size)) are used Date: Sat, 25 Nov 2023 07:34:39 +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: 12.2.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: alexhenrie24 at gmail 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: cc attachments.created 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=3D111107 Alex Henrie changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24 at gmail dot = com --- Comment #8 from Alex Henrie --- Created attachment 56685 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56685&action=3Dedit File that crashed my patched MinGW I tried to compile Wine 8.21 with GCC 12 plus the patch from comment #5 and -march=3Dnative on a Ryzen 7800X3D, but MinGW crashed with: i686-w64-mingw32-gcc -c -o libs/tiff/i386-windows/libtiff/tif_aux.o libs/tiff/libtiff/tif_aux.c -Ilibs/tiff -Iinclude -Iinclude/msvcrt \ -Ilibs/tiff/libtiff -Ilibs/jpeg -Ilibs/zlib -D_UCRT -DFAR=3D -DZ_SOLO -D__WINE_PE_BUILD \ -fno-strict-aliasing -Wno-packed-not-aligned -fno-omit-frame-pointer -march=3Dnative -freport-bug during RTL pass: split1 libs/tiff/libtiff/tif_aux.c: In function =E2=80=98_TIFFUInt64ToFloat=E2=80= =99: libs/tiff/libtiff/tif_aux.c:415:1: internal compiler error: in assign_stack_local_1, at function.cc:429 415 | } | ^ 0x19408f7 internal_error(char const*, ...) ???:0 0x6674e6 fancy_abort(char const*, int, char const*) ???:0 0xee3860 assign_386_stack_local(machine_mode, ix86_stack_slot) ???:0 0x130bfa7 gen_split_56(rtx_insn*, rtx_def**) ???:0 0x17066c2 split_insns(rtx_def*, rtx_insn*) ???:0 0x873ece try_split(rtx_def*, rtx_insn*, int) ???:0 0xb60f02 split_all_insns() ???:0 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. Preprocessed source stored into /tmp/cc824MzT.out file, please attach this = to your bugreport. make: *** [Makefile:179744: libs/tiff/i386-windows/libtiff/tif_aux.o] Error= 1 Omitting -march=3Dnative or using unpatched GCC avoids the compiler crash. I used GCC 12 because unfortunately, Arch Linux does not yet have packaging= for GCC 13, and compiling MinGW without the help of a PKGBUILD file looked pret= ty daunting. If you want to try it yourself, just clone https://gitlab.winehq.org/wine/wine.git and run `./configure CROSSCFLAGS=3D'-march=3Dnative' && make -j16`.=