From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 60536388A80C; Sun, 31 May 2020 18:55:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60536388A80C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590951330; bh=vdFzlpjN4JiZWxJmq3m/M3KGpvLWysXOgqT7TNgMQ0c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=STrJ/tA/RoFo05o5p/5MLTIGSNgg6eJCu1LMoDXgWRvh70RYdw2ORV2wi1LWiA4FU RIqPJFi2CFnx+UDSFhbWAoNWKLbTb5wz8d9F9+MKR9mi5Jap+sZZhdimzpUkesWnVu atE3Ks+6/ook7dwOrQpzAaWjqkeTZouQXaEZeGQI= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/95418] [11 Regression] Static assert going off on MinGW Date: Sun, 31 May 2020 18:55:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2020 18:55:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95418 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > Looks like: > unsigned short int __cs_selector; > - unsigned short int __opcode; > + unsigned int __opcode:11; > + unsigned int __unused4:5; >=20 > For Windows ABI, the int causes the bitfield to start at the next 4byte > alignment. Unlike Linux ABI. > I suspect using unsigned short will fix the issue. NOTE clang might not > implement the correct Windows ABI. The Visual Windows ABI does say the following: a bit-field won't share the same storage unit with the previous bit-field if their underlying types have different sizes, and the bit-field will be aligned to the highest alignment of the underlying types of itself and of the previous bit-field --- CUT --- So this is why the difference between Linux and Windows ABI comes into plac= e. So I suspect Clang is wrong.=