public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
@ 2014-04-29  0:37 ppluzhnikov at google dot com
  2014-04-29  8:06 ` [Bug c++/60992] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ppluzhnikov at google dot com @ 2014-04-29  0:37 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 6524 bytes --]

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

            Bug ID: 60992
           Summary: [4.9/4.10 Regression] ICE in tsubst_copy, at
                    cp/pt.c:12637
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppluzhnikov at google dot com

Google ref: b/14350545

Test:

/// --- cut ---
struct ScopeGuardGenerator { };

struct FF
{
  template < class F, class ... Ts >
  void
  operator () (F & ...)
  {
    const int n = sizeof ... (Ts);
    void *mutexes[n];
    auto _on_scope_exit_var_0 =
      ScopeGuardGenerator () + [&mutexes] { };
  }
};

template < class F >
int operator+ (ScopeGuardGenerator, F) { return 1; }

struct D
{
  template < class T0, class T1, class T2, class ... T >
  void
  operator () (T0, T1, const T2 & t2, T & ... t)
  {
    base (t2, t ...);
  }
  FF base;
};

D run_with_locks;

void Fn ()
{
  run_with_locks ([] { }, 0, 0);
}
/// ---cut---


Using current trunk (r209848):

g++ -c -std=c++11 t2.ii
t2.ii: In instantiation of ‘FF::operator()(F&, ...)::<lambda()> [with F = const
int; Ts = {}]’:
t2.ii:12:34:   required from ‘struct FF::operator()(F&, ...) [with F = const
int; Ts = {}]::<lambda()>’
t2.ii:12:30:   required from ‘void FF::operator()(F&, ...) [with F = const int;
Ts = {}]’
t2.ii:25:5:   required from ‘void D::operator()(T0, T1, const T2&, T& ...)
[with T0 = Fn()::<lambda()>; T1 = int; T2 = int; T = {}]’
t2.ii:34:31:   required from here
t2.ii:12:43: internal compiler error: in tsubst_copy, at cp/pt.c:12637
       ScopeGuardGenerator () + [&mutexes] { };
                                           ^
0x5d35cd tsubst_copy
    ../../gcc/cp/pt.c:12637
0x5af80b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/cp/pt.c:15150
0x5ba6f6 tsubst_expr
    ../../gcc/cp/pt.c:13979
0x5c4097 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../../gcc/cp/pt.c:11596
0x5c33f5 tsubst(tree_node*, tree_node*, int, tree_node*)
    ../../gcc/cp/pt.c:12045
0x5c2c4b tsubst(tree_node*, tree_node*, int, tree_node*)
    ../../gcc/cp/pt.c:11561
0x5d55a0 tsubst_decl
    ../../gcc/cp/pt.c:11043
0x5c388f tsubst(tree_node*, tree_node*, int, tree_node*)
    ../../gcc/cp/pt.c:11492
0x5bb12c tsubst_expr
    ../../gcc/cp/pt.c:13438
0x5bb249 tsubst_expr
    ../../gcc/cp/pt.c:13586
0x5b8399 instantiate_decl(tree_node*, int, bool)
    ../../gcc/cp/pt.c:19875
0x5f4147 instantiate_class_template_1
    ../../gcc/cp/pt.c:9334
0x5f4147 instantiate_class_template(tree_node*)
    ../../gcc/cp/pt.c:9402
0x6879f3 complete_type(tree_node*)
    ../../gcc/cp/typeck.c:134
0x5afa30 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/cp/pt.c:15247
0x5b19bb tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
    ../../gcc/cp/pt.c:14362
0x5ba6f6 tsubst_expr
    ../../gcc/cp/pt.c:13979
0x5bd579 tsubst_expr
    ../../gcc/cp/pt.c:13489
0x5ba0a3 tsubst_expr
    ../../gcc/cp/pt.c:13381
0x5bb249 tsubst_expr
    ../../gcc/cp/pt.c:13586
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.


The test compiles cleanly with Clang and gcc-4.8 (at least the version I have).
>From gcc-bugs-return-450087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Apr 29 01:15:19 2014
Return-Path: <gcc-bugs-return-450087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20609 invoked by alias); 29 Apr 2014 01:15:18 -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 20558 invoked by uid 48); 29 Apr 2014 01:15:12 -0000
From: "fkrogh#gcc at mathalacarte dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60993] New: Trouble initializing double precision variable using boz literals
Date: Tue, 29 Apr 2014 01:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fkrogh#gcc at mathalacarte dot com
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-60993-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-04/txt/msg02107.txt.bz2
Content-length: 1195

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

            Bug ID: 60993
           Summary: Trouble initializing double precision variable using
                    boz literals
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fkrogh#gcc at mathalacarte dot com

Created attachment 32701
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id2701&actioníit
This code illustrates the problem above

The attached file gets this error during the compile

inf.f90:21:0: internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:5446
    dinfn = transfer(infn, dinfn) ! Comment this to see failure above.

If you comment out the statement causing this problem you can see that a
transfer with a parameter array to a double works, but the same fails when
using an array literal.

I am just interested in getting plus and minus infinity set in parameters or
variables to use in my code.  Their use really simplifies some code.  I'd like
them defined for single, double, and quad precisions.


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
@ 2014-04-29  8:06 ` jakub at gcc dot gnu.org
  2014-05-02 19:48 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-29  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-04-29
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |4.9.1
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This first started to be rejected (but no ICE) with r196747, and started to
error out + ICE afterwards with r197811.


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
  2014-04-29  8:06 ` [Bug c++/60992] " jakub at gcc dot gnu.org
  2014-05-02 19:48 ` jason at gcc dot gnu.org
@ 2014-05-02 19:48 ` jason at gcc dot gnu.org
  2014-05-02 19:48 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-05-02 19:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri May  2 19:47:56 2014
New Revision: 210018

URL: http://gcc.gnu.org/viewcvs?rev=210018&root=gcc&view=rev
Log:
    PR c++/60992
    * lambda.c (lambda_capture_field_type): Wrap anything dependent
    other than 'this' or a VLA.
    (is_this): New.
    * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
    the operand was static or constant.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C
Modified:
    branches/gcc-4_9-branch/gcc/cp/ChangeLog
    branches/gcc-4_9-branch/gcc/cp/lambda.c
    branches/gcc-4_9-branch/gcc/cp/pt.c


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
                   ` (2 preceding siblings ...)
  2014-05-02 19:48 ` jason at gcc dot gnu.org
@ 2014-05-02 19:48 ` jason at gcc dot gnu.org
  2014-05-30 15:10 ` jason at gcc dot gnu.org
  2014-06-03 15:39 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-05-02 19:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri May  2 19:47:40 2014
New Revision: 210017

URL: http://gcc.gnu.org/viewcvs?rev=210017&root=gcc&view=rev
Log:
    PR c++/60992
    * lambda.c (lambda_capture_field_type): Wrap anything dependent
    other than 'this'.
    (add_capture): Check for VLA before calling it.
    * semantics.c (is_this_parameter): Accept any 'this' parameter, not
    just the current one.  Make non-static.
    * cp-tree.h: Declare it.
    * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
    the operand was static or constant.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/lambda.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
  2014-04-29  8:06 ` [Bug c++/60992] " jakub at gcc dot gnu.org
@ 2014-05-02 19:48 ` jason at gcc dot gnu.org
  2014-05-02 19:48 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-05-02 19:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
                   ` (3 preceding siblings ...)
  2014-05-02 19:48 ` jason at gcc dot gnu.org
@ 2014-05-30 15:10 ` jason at gcc dot gnu.org
  2014-06-03 15:39 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-05-30 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri May 30 15:09:40 2014
New Revision: 211084

URL: http://gcc.gnu.org/viewcvs?rev=211084&root=gcc&view=rev
Log:
    PR c++/60992
    * pt.c (tsubst_init): Split out from...
    (tsubst_expr) [DECL_EXPR]: Here.
    (tsubst_copy) [VAR_DECL]: Use it.
    * semantics.c (finish_id_expression): Return the decl for static/const.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c


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

* [Bug c++/60992] [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637
  2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
                   ` (4 preceding siblings ...)
  2014-05-30 15:10 ` jason at gcc dot gnu.org
@ 2014-06-03 15:39 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2014-06-03 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jun  3 15:39:20 2014
New Revision: 211188

URL: http://gcc.gnu.org/viewcvs?rev=211188&root=gcc&view=rev
Log:
    PR c++/60992
    * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first.  Add a new
    variable to local_specializations.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


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

end of thread, other threads:[~2014-06-03 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29  0:37 [Bug c++/60992] New: [4.9/4.10 Regression] ICE in tsubst_copy, at cp/pt.c:12637 ppluzhnikov at google dot com
2014-04-29  8:06 ` [Bug c++/60992] " jakub at gcc dot gnu.org
2014-05-02 19:48 ` jason at gcc dot gnu.org
2014-05-02 19:48 ` jason at gcc dot gnu.org
2014-05-02 19:48 ` jason at gcc dot gnu.org
2014-05-30 15:10 ` jason at gcc dot gnu.org
2014-06-03 15:39 ` 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).