public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60305] New: ICE constexpr array of functions in template
@ 2014-02-21 20:13 trashyankes at wp dot pl
  2014-02-25  6:47 ` [Bug c++/60305] " daniel.kruegler at googlemail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: trashyankes at wp dot pl @ 2014-02-21 20:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

            Bug ID: 60305
           Summary: ICE constexpr array of functions in template
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trashyankes at wp dot pl

-->8---->8---->8---->8---->8--

template<int Y>
int F() { return Y; }

template<int... I>
void func(int i)
{
//internal compiler error: in type_dependent_expression_p, at cp/pt.c:19969
    constexpr int (*Func[])() = { F<I>... }; 
    return Func[i]();
}

-->8---->8---->8---->8---->8--

without constexpr its compile without error.


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

* [Bug c++/60305] ICE constexpr array of functions in template
  2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
@ 2014-02-25  6:47 ` daniel.kruegler at googlemail dot com
  2014-03-01  0:42 ` [Bug c++/60305] [4.7 Regression] " reichelt at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-02-25  6:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

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> ---
Seems to be fixed in 4.9.0 head. Note that your func function template is
broken, because it is declared as returning void, but obviously returns a
non-void result.
>From gcc-bugs-return-444730-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Feb 25 06:59:45 2014
Return-Path: <gcc-bugs-return-444730-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20865 invoked by alias); 25 Feb 2014 06:59:45 -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 20840 invoked by uid 48); 25 Feb 2014 06:59:42 -0000
From: "abel at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/60292] [4.9 Regression] ICE: in fill_vec_av_set, at sel-sched.c:3863 with -m64 after r206174 on powerpc-apple-darwin9.8.0
Date: Tue, 25 Feb 2014 06:59: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.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: abel at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: abel at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-60292-4-JRTBLGE5fa@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60292-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60292-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: 2014-02/txt/msg02487.txt.bz2
Content-length: 516

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`292

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Andrey Belevantsev <abel at gcc dot gnu.org> ---
Fixed on trunk.  No need to backport as the initial assert patch was committed
to trunk only.


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

* [Bug c++/60305] [4.7 Regression] ICE constexpr array of functions in template
  2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
  2014-02-25  6:47 ` [Bug c++/60305] " daniel.kruegler at googlemail dot com
@ 2014-03-01  0:42 ` reichelt at gcc dot gnu.org
  2014-03-18 16:28 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-01  0:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.6.0, 4.8.3, 4.9.0
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2014-03-01
                 CC|                            |reichelt at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE constexpr array of      |[4.7 Regression] ICE
                   |functions in template       |constexpr array of
                   |                            |functions in template
   Target Milestone|---                         |4.7.4
      Known to fail|                            |4.7.0, 4.8.0, 4.8.1, 4.8.2

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed. Happens since GCC 4.7.0, but is already fixed on the trunk (for GCC
4.9.0) and on the 4.8 branch (for GCC 4.8.3). Valid testcase:

===========================================
template<int I> int foo() { return I; }

template<int... I> void bar()
{
  constexpr int (*X[])() = { foo<I>... };
}

template void bar<1,3,5>();
===========================================


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

* [Bug c++/60305] [4.7 Regression] ICE constexpr array of functions in template
  2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
  2014-02-25  6:47 ` [Bug c++/60305] " daniel.kruegler at googlemail dot com
  2014-03-01  0:42 ` [Bug c++/60305] [4.7 Regression] " reichelt at gcc dot gnu.org
@ 2014-03-18 16:28 ` paolo.carlini at oracle dot com
  2014-03-18 17:11 ` paolo at gcc dot gnu.org
  2014-03-18 17:12 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-18 16:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Let's add the testcase to mainline and close this.


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

* [Bug c++/60305] [4.7 Regression] ICE constexpr array of functions in template
  2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
                   ` (2 preceding siblings ...)
  2014-03-18 16:28 ` paolo.carlini at oracle dot com
@ 2014-03-18 17:11 ` paolo at gcc dot gnu.org
  2014-03-18 17:12 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-03-18 17:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Mar 18 17:10:23 2014
New Revision: 208658

URL: http://gcc.gnu.org/viewcvs?rev=208658&root=gcc&view=rev
Log:
2014-03-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/60305
    * g++.dg/cpp0x/constexpr-ice14.C: New.

2014-03-18  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/54250
    * g++.dg/cpp0x/lambda/lambda-ice12.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice14.C
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice12.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/60305] [4.7 Regression] ICE constexpr array of functions in template
  2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
                   ` (3 preceding siblings ...)
  2014-03-18 17:11 ` paolo at gcc dot gnu.org
@ 2014-03-18 17:12 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-18 17:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60305

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


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

end of thread, other threads:[~2014-03-18 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 20:13 [Bug c++/60305] New: ICE constexpr array of functions in template trashyankes at wp dot pl
2014-02-25  6:47 ` [Bug c++/60305] " daniel.kruegler at googlemail dot com
2014-03-01  0:42 ` [Bug c++/60305] [4.7 Regression] " reichelt at gcc dot gnu.org
2014-03-18 16:28 ` paolo.carlini at oracle dot com
2014-03-18 17:11 ` paolo at gcc dot gnu.org
2014-03-18 17:12 ` paolo.carlini at oracle 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).