From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9634 invoked by alias); 7 Apr 2014 22:23:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9540 invoked by uid 48); 7 Apr 2014 22:23:38 -0000 From: "peter at lekensteyn dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60784] New: Spurious -Wmissing-field-initializers warning for anonymous structure Date: Mon, 07 Apr 2014 22:23:00 -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: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: peter at lekensteyn dot nl X-Bugzilla-Status: UNCONFIRMED 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 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 X-SW-Source: 2014-04/txt/msg00512.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60784 Bug ID: 60784 Summary: Spurious -Wmissing-field-initializers warning for anonymous structure Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: peter at lekensteyn dot nl When an anonymous structure gets initialized, gcc always starts complaining about the last field: ////////////////////////////////////////// gcc -Wextra warn.c -o /dev/null ////////////////////////////////////////// struct foo { struct { char a; char b; }; }; int main(void) { struct foo test =3D { .a =3D 1, .b =3D 2, }; return test.a =3D=3D 1; } /////////////////////////////////////////// Output: warn.c: In function =E2=80=98main=E2=80=99: warn.c:12:9: warning: missing initializer for field =E2=80=98b=E2=80=99 of = =E2=80=98struct =E2=80=99 [-Wmissing-field-initializers] .b =3D 2, ^ warn.c:5:14: note: =E2=80=98b=E2=80=99 declared here char b; ^ It gets even worse when adding more fields. For fun, add "char c;" between "char a;" and "char b;". The first warning mentions "c", but the line thereafter points to "b": warn.c: In function =E2=80=98main=E2=80=99: warn.c:13:9: warning: missing initializer for field =E2=80=98c=E2=80=99 of = =E2=80=98struct =E2=80=99 [-Wmissing-field-initializers] .b =3D 2, ^ warn.c:5:14: note: =E2=80=98c=E2=80=99 declared here char c; ^ Expected result: no warnings for the first case. This is gcc-multilib 4.8.2-8 on Arch Linux x86_64. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapp= er Target: x86_64-unknown-linux-gnu Configured with: /build/gcc-multilib/src/gcc-4.8-20140206/configure --prefix=3D/usr --libdir=3D/usr/lib --libexecdir=3D/usr/lib --mandir=3D/usr= /share/man --infodir=3D/usr/share/info --with-bugurl=3Dhttps://bugs.archlinux.org/ --enable-languages=3Dc,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=3Dposix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=3Dgnu --disable-libstdcxx-p= ch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=3Disl --disable-cloog-version-check --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=3Dgnu --enable-multilib --disable-werror --enable-checking=3Drelease Thread model: posix gcc version 4.8.2 20140206 (prerelease) (GCC) >>From gcc-bugs-return-448493-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Apr 07 22:47:04 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22347 invoked by alias); 7 Apr 2014 22:47:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22297 invoked by uid 48); 7 Apr 2014 22:47:01 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60657] [4.9 Regression] ICE: error: insn does not satisfy its constraints Date: Mon, 07 Apr 2014 22:47:00 -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: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg00513.txt.bz2 Content-length: 415 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60657 --- Comment #13 from Jeffrey A. Law --- The new predicates make the predicate test match the constraint test. It looks like your patch exposes a relationship between the operands, and, yes, the only way to handle that would be in the insn's condition. I'm not ARM savvy enough to know if that's the right condition or not though. jeff