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

             Bug #: 50861
           Summary: ICE: internal compiler error: tree check: expected
                    tree that contains ‘decl minimal’ structure, have
                    ‘error_mark’ in tsubst_copy_and_build, at
                    cp/pt.c:13526
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ca...@cs.stanford.edu


Created attachment 25607
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25607
Program that causes g++ to ICE.

g++ ICE's with error "internal compiler error: tree check: expected tree that
contains ‘decl minimal’ structure, have ‘error_mark’ in tsubst_copy_and_build,
at cp/pt.c:13526"

Command to reproduce: /home/cas43/new-gcc/inst/bin/g++ prog.cpp -c -O3

Full diagnostic:

prog.cpp:1:40: error: there are no arguments to ‘k’ that depend on a template
parameter, so a declaration of ‘k’ must be available [-fpermissive]
prog.cpp:1:40: note: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
prog.cpp: In constructor ‘A<T>::A(int) [with T = int]’:
prog.cpp:2:22: error: use of parameter from containing function
prog.cpp:2:6: error:   ‘int k’ declared here
prog.cpp:2:22: error: ‘k’ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
prog.cpp:2:22: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘error_mark’ in tsubst_copy_and_build, at
cp/pt.c:13526
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Compiler Version:

Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111024 (experimental) (GCC)

Reply via email to