From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7213 invoked by alias); 13 Jun 2013 19:23:39 -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 7162 invoked by uid 48); 13 Jun 2013 19:23:30 -0000 From: "harald at gigawatt dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56977] gcc -Og incorrectly warns about 'constant zero length parameter' Date: Thu, 13 Jun 2013 19:23: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.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: harald at gigawatt 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: 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: 2013-06/txt/msg00697.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56977 Harald van Dijk changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #1 from Harald van Dijk --- This is a bigger problem with glibc's open() implementation, where correct = use does not just lead to a warning, but to a compile-time error. Self-contained test: __attribute__((__error__("error"))) void error (); void f (int); extern inline __attribute__((__always_inline__)) void f (int i) { if (__builtin_constant_p (i)) { error (); } } void g(int j) { f (j); } Compiling with -Og leads to: $ gcc -Og -c test.c In function =E2=80=98f=E2=80=99, inlined from =E2=80=98g=E2=80=99 at test.c:12:5: test.c:7:11: error: call to =E2=80=98error=E2=80=99 declared with attribute= error: error error (); ^ $ gcc --version gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The if block, including the call to error(), gets removed at all optimizati= on levels (even -O0) other than -Og. >>From gcc-bugs-return-424319-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 13 19:43:56 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 26215 invoked by alias); 13 Jun 2013 19:43:55 -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 26184 invoked by uid 48); 13 Jun 2013 19:43:52 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57509] Segmentation fault when using __builtin_shuffle in templated class. Date: Thu, 13 Jun 2013 19:43: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.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: glisse at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to target_milestone 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: 2013-06/txt/msg00698.txt.bz2 Content-length: 564 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57509 Marc Glisse changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |glisse at gcc dot gnu.org Target Milestone|--- |4.9.0 --- Comment #8 from Marc Glisse --- Patch posted: http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00470.html