From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9370 invoked by alias); 11 Jun 2019 21:03: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 9356 invoked by uid 48); 11 Jun 2019 21:03:37 -0000 From: "subscriptions-gnu at vsbe dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/90844] New: Another case of missing use of uninitialized variable warning Date: Tue, 11 Jun 2019 21:03: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: subscriptions-gnu at vsbe 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 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: 2019-06/txt/msg00882.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90844 Bug ID: 90844 Summary: Another case of missing use of uninitialized variable warning Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: subscriptions-gnu at vsbe dot com Target Milestone: --- this is somewhat similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D= 18501, but a bit different. Here is the code to trigger the problem: vvvvvvvvvvv try.c vvvvvvvvvvvvvvvvvvvvvvvvvvv static int func1(int x) { return 1; } static int func2(void) { int number; if (func2() =3D=3D 0) number +=3D func1(0); return number; } int main(int argc, char **argv) { int counter; counter +=3D func2(); return counter; } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Running on 4.19.28-2 x86_64 GNU/Linux, using compiler version vvvvvvvvvvvvvvvvvvvvvvvvvvvv arm-eabi-gcc -v Using built-in specs. COLLECT_GCC=3D/usr/local/google/home/vbendeb/new_projects/1grepo/chroot/opt= /coreboot-sdk/bin/arm-eabi-gcc COLLECT_LTO_WRAPPER=3D/usr/local/google/home/vbendeb/new_projects/1grepo/ch= root/opt/coreboot-sdk/bin/../lib/gcc/arm-eabi/8.3.0/lto-wrapper Target: arm-eabi Configured with: ../gcc-8.3.0/configure --prefix=3D/opt/coreboot-sdk --libexecdir=3D/opt/coreboot-sdk/lib --target=3Darm-eabi --disable-werror --disable-shared --enable-lto --enable-plugins --enable-gold --enable-ld=3Ddefault --disable-libssp --disable-bootstrap --disable-nls --disable-libquadmath --without-headers --disable-threads --enable-interwork --enable-multilib --enable-targets=3Dall --disable-libatomic --disable-libc= c1 --disable-decimal-float --enable-languages=3Dc,ada --with-system-zlib --with-gmp=3D/var/tmp/portage/dev-embedded/coreboot-sdk-0.0.1-r74/work/core= boot-sdk-0.0.1/out/opt/coreboot-sdk --with-mpfr=3D/var/tmp/portage/dev-embedded/coreboot-sdk-0.0.1-r74/work/cor= eboot-sdk-0.0.1/out/opt/coreboot-sdk --with-mpc=3D/var/tmp/portage/dev-embedded/coreboot-sdk-0.0.1-r74/work/core= boot-sdk-0.0.1/out/opt/coreboot-sdk --with-gnu-as --with-gnu-ld --with-pkgversion=3D'coreboot toolchain v ' Thread model: single gcc version 8.3.0 (coreboot toolchain v )=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The below invocation properly highlights two instance of the uninitialized variable assignment: $ arm-eabi-gcc -Wall -o try.o -c try.c try.c: In function 'func2': try.c:7:34: warning: 'number' may be used uninitialized in this function [-Wmaybe-uninitialized] if (func2() =3D=3D 0) number +=3D func1(0); ^~ try.c: In function 'main': try.c:14:17: warning: 'counter' is used uninitialized in this function [-Wuninitialized] counter +=3D func2(); ^~ $ The following invocation triggers only one warning: $ arm-eabi-gcc -Wall -Os -flto -o try.o -c try.c try.c: In function 'main': try.c:14:17: warning: 'counter' is used uninitialized in this function [-Wuninitialized] counter +=3D func2(); ^~ $ >>From gcc-bugs-return-646368-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 11 21:57:06 2019 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 79942 invoked by alias); 11 Jun 2019 21:57:05 -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 79898 invoked by uid 48); 11 Jun 2019 21:57:02 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/90397] Incompatibility with clang-tidy on std::variant Date: Tue, 11 Jun 2019 21:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.2 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-SW-Source: 2019-06/txt/msg00883.txt.bz2 Content-length: 1099 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90397 --- Comment #8 from Jonathan Wakely --- G++ allowed it because the mismatch was in a system header. If you use -Wsystem-headers then GCC 9.1 gives a warning about it: /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant: In instantiation of 'cl= ass std::variant': var.cc:14:44: required from here /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant:1559:34: warning: declaration of 'template constexpr decltype(auto) std::__detail::__variant::__get(_Vp&&)' has a different exception specifier [-Wsystem-headers] 1559 | friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& _= _v); | ^~~~~~~~ /xhome/jwakely/gcc/9.1.0/include/c++/9.1.0/variant:263:5: note: from previo= us declaration 'template constexpr decltype(auto) std::__detail::__variant::__get(_Variant&&) noexcept' 263 | __get(_Variant&& __v) noexcept | ^~~~~ If you use -pedantic-errors then you get an error. >>From gcc-bugs-return-646369-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 11 22:04:46 2019 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 85900 invoked by alias); 11 Jun 2019 22:04:45 -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 85879 invoked by uid 55); 11 Jun 2019 22:04:42 -0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/90744] [7/8/9/10 Regression] Bogus length for character temporaries passed to external procedures since r268992 Date: Tue, 11 Jun 2019 22:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 7.5 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-SW-Source: 2019-06/txt/msg00884.txt.bz2 Content-length: 1171 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90744 --- Comment #8 from Thomas Koenig --- Author: tkoenig Date: Tue Jun 11 22:04:10 2019 New Revision: 272173 URL: https://gcc.gnu.org/viewcvs?rev=3D272173&root=3Dgcc&view=3Drev Log: 2019-06-11 Thomas Koenig Tom=C3=A1=C5=A1 Trnka Backport from trunk PR fortran/90744 * trans-types.c (get_formal_from_actual_arglist): Unset typespec flags which make no sense for procedures without explicit interface. 2019-06-11 Thomas Koenig Tom=C3=A1=C5=A1 Trnka Backport from trunk PR fortran/90744 * gfortran.dg/deferred_character_33.f90: New test. * gfortran.dg/deferred_character_33a.f90: New test. Added: branches/gcc-9-branch/gcc/testsuite/gfortran.dg/deferred_character_33.f= 90 branches/gcc-9-branch/gcc/testsuite/gfortran.dg/deferred_character_33a.= f90 Modified: branches/gcc-9-branch/gcc/fortran/ChangeLog branches/gcc-9-branch/gcc/fortran/trans-types.c branches/gcc-9-branch/gcc/testsuite/ChangeLog >>From gcc-bugs-return-646370-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 11 22:26:51 2019 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 108606 invoked by alias); 11 Jun 2019 22:26:51 -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 108538 invoked by uid 48); 11 Jun 2019 22:26:48 -0000 From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/90513] asm thunks do not work on PowerPC64/VxWorks (kernel mode) Date: Tue, 11 Jun 2019 22:26: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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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: 2019-06/txt/msg00885.txt.bz2 Content-length: 289 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90513 --- Comment #19 from Segher Boessenkool --- Also, please post proper patches, to the gcc-patches mailing list, as detailed in , if you want those patches to be approved. >>From gcc-bugs-return-646371-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 11 22:31:48 2019 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 111893 invoked by alias); 11 Jun 2019 22:31:48 -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 111885 invoked by uid 89); 11 Jun 2019 22:31:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*Ad:U*amodra, HX-Languages-Length:377 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jun 2019 22:31:46 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x5BMViYE020798; Tue, 11 Jun 2019 17:31:44 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id x5BMVikW020797; Tue, 11 Jun 2019 17:31:44 -0500 Date: Tue, 11 Jun 2019 22:31:00 -0000 From: Segher Boessenkool To: Umesh Kalappa Cc: Alan Modra , gcc-bugs@gcc.gnu.org Subject: Re: [Bug target/90513] asm thunks do not work on PowerPC64/VxWorks (kernel mode) Message-ID: <20190611223144.GL31586@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00886.txt.bz2 Content-length: 300 On Tue, Jun 11, 2019 at 10:25:58PM +0530, Umesh Kalappa wrote: > We would like to know comments on the below proposed change ? As I said in the PR, this is not a proper patch. Also, like Eric says there, it does not do the right thing for many configurations. Fix the loader, instead? Segher