public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66281] New: [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022
@ 2015-05-25 20:42 ldionne.2 at gmail dot com
  2015-06-14 17:27 ` [Bug c++/66281] " trippels at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ldionne.2 at gmail dot com @ 2015-05-25 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66281
           Summary: [C++14][Variable templates] internal compiler error:
                    in tsubst, at cp/pt.c:12022
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldionne.2 at gmail dot com
  Target Milestone: ---

Hi,

The following code causes an ICE on GCC trunk (couple of weeks old):

------------------------------------------------------------------------
template <typename ...> auto f() { return 1; }

template <char>
auto variable_template2 = f();

template <char c>
auto variable_template1 = variable_template2<c>;

template int variable_template1<'c'>;
------------------------------------------------------------------------


Sample command line (lines trimmed):
------------------------------------------------------------------------
› ~/code/gcc5/bin/g++ --version
g++ (GCC) 6.0.0 20150423 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.


› ~/code/gcc5/bin/g++ -std=c++1y ~/Desktop/bug.cpp
~/Desktop/bug.cpp: In instantiation of ‘auto variable_template1<'c'>’:
~/Desktop/bug.cpp:9:14:   required from here
~/Desktop/bug.cpp:4:6: internal compiler error: in tsubst, at cp/pt.c:11973
 auto variable_template2 = f();
      ^

~/Desktop/bug.cpp:4:6: internal compiler error: Abort trap: 6
g++: internal compiler error: Abort trap: 6 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
------------------------------------------------------------------------

Regards,
Louis Dionne
>From gcc-bugs-return-487236-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 25 20:57:09 2015
Return-Path: <gcc-bugs-return-487236-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 90993 invoked by alias); 25 May 2015 20:57:09 -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 90955 invoked by uid 48); 25 May 2015 20:57:04 -0000
From: "mikpelinux at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/66252] [6 regression] bootstrap comparison failures on sparc-linux
Date: Mon, 25 May 2015 20:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikpelinux at gmail 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: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66252-4-9WPfM78yjL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66252-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66252-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-05/txt/msg02076.txt.bz2
Content-length: 1791

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

--- Comment #1 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Started with r222267:

fc6cc27b3f46a6f70f610ec93a1c5e68d83c933b is the first bad commit
commit fc6cc27b3f46a6f70f610ec93a1c5e68d83c933b
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Apr 21 12:52:43 2015 +0000

    2015-04-21  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/65650
        * tree-ssa-ccp.c (valid_lattice_transition): Allow lattice
        transitions involving copies.
        (set_lattice_value): Adjust for copy lattice state.
        (ccp_lattice_meet): Do not merge UNDEFINED and a copy to the copy
        if that doesn't dominate the merge point.
        (bit_value_unop): Adjust what we treat as varying mask.
        (bit_value_binop): Likewise.
        (bit_value_assume_aligned): Likewise.
        (evaluate_stmt): When we simplified to a SSA name record a copy
        instead of dropping to varying.
        (visit_assignment): Simplify.

        * gimple-match.h (gimple_simplify): Add another callback.
        * gimple-fold.c (fold_stmt_1): Adjust caller.
        (gimple_fold_stmt_to_constant_1): Likewise - pass valueize
        for the 2nd callback.
        * gimple-match-head.c (gimple_simplify): Add a callback that is
        used to valueize the stmt operands and use it that way.

        * gcc.dg/tree-ssa/ssa-ccp-37.c: New testcase.
        * gcc.dg/tree-ssa/forwprop-11.c: Adjust.
        * gcc.dg/tree-ssa/ssa-fre-3.c: Likewise.
        * gcc.dg/tree-ssa/ssa-fre-4.c: Likewise.
        * gcc.dg/tree-ssa/ssa-fre-5.c: Likewise.
        * gcc.dg/tree-ssa/ssa-fre-32.c: Likewise.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222267
138bc75d-0d04-0410-961f-82ee72b054a4


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

* [Bug c++/66281] [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022
  2015-05-25 20:42 [Bug c++/66281] New: [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022 ldionne.2 at gmail dot com
@ 2015-06-14 17:27 ` trippels at gcc dot gnu.org
  2015-07-16  9:11 ` rguenth at gcc dot gnu.org
  2015-08-06  4:15 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-14 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here is a variant:

template <int> int bool_;
template <char n> auto digit(bool_<n>);
template <char, int, int y> auto evaluate(digit<y>);
auto boost_hana_tmp_40 = evaluate<'1', '+', '2'>;


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

* [Bug c++/66281] [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022
  2015-05-25 20:42 [Bug c++/66281] New: [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022 ldionne.2 at gmail dot com
  2015-06-14 17:27 ` [Bug c++/66281] " trippels at gcc dot gnu.org
@ 2015-07-16  9:11 ` rguenth at gcc dot gnu.org
  2015-08-06  4:15 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|5.2                         |5.3

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.


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

* [Bug c++/66281] [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022
  2015-05-25 20:42 [Bug c++/66281] New: [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022 ldionne.2 at gmail dot com
  2015-06-14 17:27 ` [Bug c++/66281] " trippels at gcc dot gnu.org
  2015-07-16  9:11 ` rguenth at gcc dot gnu.org
@ 2015-08-06  4:15 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2015-08-06  4:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 5.3/6.


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

end of thread, other threads:[~2015-08-06  4:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 20:42 [Bug c++/66281] New: [C++14][Variable templates] internal compiler error: in tsubst, at cp/pt.c:12022 ldionne.2 at gmail dot com
2015-06-14 17:27 ` [Bug c++/66281] " trippels at gcc dot gnu.org
2015-07-16  9:11 ` rguenth at gcc dot gnu.org
2015-08-06  4:15 ` jason at gcc dot gnu.org

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).