From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13934 invoked by alias); 19 Sep 2014 19:26:33 -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 13888 invoked by uid 48); 19 Sep 2014 19:26:27 -0000 From: "gccbugs at dima dot secretsauce.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63178] Missed "incorrect-type-passed-to-function warning" Date: Fri, 19 Sep 2014 19:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gccbugs at dima dot secretsauce.net X-Bugzilla-Status: REOPENED 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_status resolution 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-SW-Source: 2014-09/txt/msg01978.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63178 Dima Kogan changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #10 from Dima Kogan --- Hi. I filed this bug against ccache, and its maintainer had some insight and th= inks that this is a gcc issue after all. I'm reopening this bug here with the salient portion of the comment from the ccache maintainer copied below. Tha= nks. I would say that this is not a ccache bug. For ccache to work as expected in its default operation mode, the compiler must be able to compile its own preprocessed source code with the same result as compiling without the preprocessing step. In essence, compiler [OPTIONS] -E source.c -o source.i compiler [OPTIONS] -c source.i -o source.o needs to give the same result as compiler [OPTIONS] -c source.c -o source.o GCC doesn't do that for your test case: % gcc-4.9 -Wall -Wextra -E bugreport.c -o bugreport.i % gcc-4.9 -Wall -Wextra -c bugreport.i -o /dev/null % gcc-4.9 -Wall -Wextra -c bugreport.c -o /dev/null bugreport.c: In function =E2=80=98fn1=E2=80=99: bugreport.c:14:5: warning: passing argument 1 of =E2=80=98fff=E2=80=99 = from incompatible pointer type fff(&sss,0,0); ^ bugreport.c:6:5: note: expected =E2=80=98struct sss_t *=E2=80=99 but ar= gument is of type =E2=80=98struct sss_t **=E2=80=99 int fff( sss_t* ctx, int a, int b); ^ bugreport.c:15:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ..... Digging a bit deeper, the behavior difference comes from this part of the preprocessed output: % tail -n 11 bugreport.i int fn1() { sss_t* sss =3D ((void *)0); printf("%s %d", "bugreport.c" # 12 "bugreport.c" 3 4 , 0 ) ; fff(&sss,0,0); } The flag "3" after '# 12 "bugreport.c"' indicates that the following text c= omes from a system header, which doesn't look right. (If bugreport.h is found locally instead of in /usr/include, then the "3" flag disappears.) Sounds l= ike a GCC bug to me. >>From gcc-bugs-return-462145-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 19 19:46:25 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25705 invoked by alias); 19 Sep 2014 19:46:25 -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 25653 invoked by uid 48); 19 Sep 2014 19:46:21 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63315] New: -fcompare-debug bootstrap issue in libjava (fixup_abnormal_edges related) Date: Fri, 19 Sep 2014 19:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org 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 cc Message-ID: 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-09/txt/msg01979.txt.bz2 Content-length: 2161 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63315 Bug ID: 63315 Summary: -fcompare-debug bootstrap issue in libjava (fixup_abnormal_edges related) Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: vmakarov at gcc dot gnu.org In x86_64-linux trunk: ../configure --enable-languages=all,obj-c++,lto,go --disable-libcilkrts --enable-checking=release; GCC_COMPARE_DEBUG=1 make -j48 bootstrap > LOG 2>&1 && GCC_COMPARE_DEBUG=1 make -j48 -k check > LOGC 2>&1; ../contrib/test_summary > LOGT 2>&1 bootstrap I'm seeing: gcj: error: /tmp/ccb0xB2Sjx: -fcompare-debug failure (length) make[3]: *** [gnu-xml-util.lo] Error 1 /usr/src/gcc/obj086/./gcc/gcj -B/usr/src/gcc/obj086/x86_64-unknown-linux-gnu/libjava/ -B/usr/src/gcc/obj086/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../../../libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -fsource-filename=/usr/src/gcc/obj086/x86_64-unknown-linux-gnu/libjava/classpath/lib/classes -fjni -findirect-dispatch -fno-indirect-classes -c -o gnu-xml-util.lo @gnu-xml-util.list -fcompare-debug --param min-nondebug-insn-uid=10000 fails, with: --- ccn5lLfzjx.gk.gkd 2014-09-19 17:40:51.443440651 +0200 +++ ccn5lLfzjx.gkd 2014-09-19 17:40:47.340440895 +0200 @@ -77215,6 +77215,7 @@ Declarations used by gnu.xml.util.XCat$C (note # 0 0 NOTE_INSN_DELETED) (note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK) (note # 0 0 NOTE_INSN_FUNCTION_BEG) +(note # 0 0 NOTE_INSN_DELETED) (insn/f:TI # 0 0 2 (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [ S8 A8]) (reg:DI 44 r15)) /usr/src/gcc/libjava/classpath/gnu/xml/util/XCat.java:971# {*pushdi2_rex64} (expr_list:REG_DEAD (reg:DI 44 r15) difference.