public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66635] New: g++ ICE when compiling constexpr code with comma operator
@ 2015-06-23  9:45 andreas at sandberg dot pp.se
  2015-06-23 18:21 ` [Bug c++/66635] " daniel.kruegler at googlemail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: andreas at sandberg dot pp.se @ 2015-06-23  9:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66635

            Bug ID: 66635
           Summary: g++ ICE when compiling constexpr code with comma
                    operator
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andreas at sandberg dot pp.se
  Target Milestone: ---

Use of the comma operator in constexpr environment causes ICE in g++ 5.1.0. The
following test case triggers the bug:

--- Begin test case ---

#include <cassert>

struct Foo {
    constexpr Foo(const unsigned i) : val(i) {}
    constexpr Foo operator-(const Foo &rhs) const {
        return assert(val >= rhs.val), Foo(val - rhs.val);
    }
    unsigned val;
};

constexpr Foo foo(Foo(1) - Foo(2));

--- End test case ---

I have been able to reproduce the bug on both Linux and MacOS for gcc version
5.1.0. A colleague tested this using trunk yesterday and the error still seems
to be present. g++ version 4.9.1 does not seem to suffer from this bug.

This seems to be closely related to bug 54777.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/66635] g++ ICE when compiling constexpr code with comma operator
  2015-06-23  9:45 [Bug c++/66635] New: g++ ICE when compiling constexpr code with comma operator andreas at sandberg dot pp.se
@ 2015-06-23 18:21 ` daniel.kruegler at googlemail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2015-06-23 18:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66635

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
Please note that the code itself is invalid unless you require NDEBUG to be
defined.
>From gcc-bugs-return-490001-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 18:29:12 2015
Return-Path: <gcc-bugs-return-490001-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23128 invoked by alias); 23 Jun 2015 18:29:12 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23087 invoked by uid 48); 23 Jun 2015 18:29:07 -0000
From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66639] Feature request C++: mark __func__ , __FUNCTION__ & __PRETTY_FUNCTION__ as constexpr
Date: Tue, 23 Jun 2015 18:29: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: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: daniel.kruegler at googlemail 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: cc
Message-ID: <bug-66639-4-oSvD6pzLeq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66639-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66639-4@http.gcc.gnu.org/bugzilla/>
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-06/txt/msg02333.txt.bz2
Content-length: 703

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66639

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
Strictly speaking your request would be non-conforming, because the semantics
of e.g. __func__ is specified to be

static const char __func__[] = "function-name";

If at all, this could only be provided as compiler extension.
>From gcc-bugs-return-490002-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 18:41:22 2015
Return-Path: <gcc-bugs-return-490002-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9225 invoked by alias); 23 Jun 2015 18:41:21 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8995 invoked by uid 48); 23 Jun 2015 18:41:17 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66626] [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
Date: Tue, 23 Jun 2015 18:41: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: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
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: bug_status cf_reconfirmed_on everconfirmed
Message-ID: <bug-66626-4-LBaaO0zKKX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66626-4@http.gcc.gnu.org/bugzilla/>
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-06/txt/msg02334.txt.bz2
Content-length: 838

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-23
     Ever confirmed|0                           |1

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
Confirmed, reduced testcase:

--cut here--
extern void abort (void);

int s (int i)
{
  __label__ l1;
  int f (int i)
  {
    if (i == 2)
      goto l1;
    return 0;
  }
  return f (i);
 l1:;
  return 1;
}

int main ()
{
  if (s (2) != 1)
    abort ();

  return 0;
}
--cut here--

$ gcc -O2 -mregparm=3 -m32 t.c
$ ./a.out
Segmentation fault (core dumped)
>From gcc-bugs-return-490003-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 23 18:47:46 2015
Return-Path: <gcc-bugs-return-490003-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 123896 invoked by alias); 23 Jun 2015 18:47:46 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 123837 invoked by uid 48); 23 Jun 2015 18:47:43 -0000
From: "mrs at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/34010] [4.9 Regression] ppc64 bad stdargs codegen for zero sized objects
Date: Tue, 23 Jun 2015 18:47: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: 4.2.1
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: major
X-Bugzilla-Who: mrs at gcc dot gnu.org
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-34010-4-A3WMN2ebsx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-34010-4@http.gcc.gnu.org/bugzilla/>
References: <bug-34010-4@http.gcc.gnu.org/bugzilla/>
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-06/txt/msg02335.txt.bz2
Content-length: 406

https://gcc.gnu.org/bugzilla/show_bug.cgi?id4010

mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |---

--- Comment #14 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> ---
Update target milestone to nothing.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-23 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23  9:45 [Bug c++/66635] New: g++ ICE when compiling constexpr code with comma operator andreas at sandberg dot pp.se
2015-06-23 18:21 ` [Bug c++/66635] " daniel.kruegler at googlemail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).