From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84267 invoked by alias); 27 Aug 2015 21:14:34 -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 84170 invoked by uid 48); 27 Aug 2015 21:14:30 -0000 From: "ldionne.2 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56958] Spurious set but not used variable warning in empty pack expansion Date: Thu, 27 Aug 2015 21:14: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ldionne.2 at gmail dot com 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: cc 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: 2015-08/txt/msg01899.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56958 Louis Dionne changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldionne.2 at gmail dot com --- Comment #4 from Louis Dionne --- The following code triggers the same warning on GCC trunk: ---------------------------------------------------------------------------= --- struct Object { int method(int) const { return 0; } }; template void expand(T&&...); template struct index_sequence { }; template struct TemplateStruct { static constexpr Object get_object() { return {}; } template static void f(index_sequence) { constexpr auto object =3D get_object(); // only fires with 'auto' expand(object.method(i)...); } }; template void TemplateStruct<>::f(index_sequence<>); ---------------------------------------------------------------------------= --- The warning is: [snip]: In instantiation of =E2=80=98 static void TemplateStruct< >::f(index_sequence) [with int ...i =3D {}; =3D = {}]=E2=80=99: [snip]: required from here [snip]: warning: variable =E2=80=98object=E2=80=99 set but not used [-Wunused-but-set-variable] constexpr auto object =3D get_object(); // only fires with 'au= to' ^ This is very annoying because that will cause perfectly fine code to emit=20 warnings when used with empty parameter packs. Also surprising is that the= =20 warning goes away if either (1) A non-template struct is used instead of TemplateStruct (2) One uses `Object object =3D ...` instead of `auto object =3D ...` which makes it obvious that this is a bug, not a feature. Please fix your compiler, or metaprogrammers all around the world will hate you for forcing them to write constexpr auto object =3D get_object(); (void)object; // workaround GCC false positive expand(object.method(i)...); in every place where a variable may be 'unused' when a parameter pack is em= pty. >>From gcc-bugs-return-495758-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 27 21:23:23 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 101316 invoked by alias); 27 Aug 2015 21:23:23 -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 101171 invoked by uid 48); 27 Aug 2015 21:23:19 -0000 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67367] Program crashes on READ(IOSTAT=IOS, ...) on directory OPEN()ed without error Date: Thu, 27 Aug 2015 21:23: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: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl 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: cc 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: 2015-08/txt/msg01900.txt.bz2 Content-length: 745 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67367 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to Jerry DeLisle from comment #1) > Program received signal SIGSEGV, Segmentation fault. > 0x00007ffff7ba152e in buf_read (s=3D0x6063b0, buf=3D,=20 > nbyte=3D) at ../../../trunk/libgfortran/io/unix.c:535 > 535 memcpy (p, s->buffer, did_read); There are a bunch of bugs lurking in fortran/io.c. For example, flush(iostat=3Dios) causes a problem. >>From gcc-bugs-return-495759-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 27 21:48:19 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 41384 invoked by alias); 27 Aug 2015 21:48:19 -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 41304 invoked by uid 48); 27 Aug 2015 21:48:15 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67351] Missed optimisation on 64-bit field compared to 32-bit Date: Thu, 27 Aug 2015 21:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ubizjak at gmail dot com 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: cf_gcctarget cc component 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: 2015-08/txt/msg01901.txt.bz2 Content-length: 523 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67351 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Target|i?86 |x86_64 CC| |hs.naveen2u at gmail dot c= om Component|target |tree-optimization --- Comment #7 from Uro=C5=A1 Bizjak --- Adding CC. >>From gcc-bugs-return-495760-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 27 22:08:22 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 88457 invoked by alias); 27 Aug 2015 22:08:22 -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 88362 invoked by uid 48); 27 Aug 2015 22:08:18 -0000 From: "gang.chen.5i5j at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/63510] Wrong line number in Wstrict-overflow message Date: Thu, 27 Aug 2015 22:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: gang.chen.5i5j at gmail dot com 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01902.txt.bz2 Content-length: 492 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63510 --- Comment #9 from Chen Gang --- We need call warning_at() instead of warnings() in fold_overflow_warning() in gcc/fold-const.c. The related location parameter of warning_at() should be calculated, just like another gcc files has done: e.g. gcc/c-family/*.c which use warning_at(). I shall continue to analyze how to calculate the location in gcc/fold-const.c, reference from the other files. Thanks.