public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50848] New: ICE in derived template class missing using for member of template base class
@ 2011-10-24 10:28 cas43 at cs dot stanford.edu
  2011-10-24 14:30 ` [Bug c++/50848] [4.7 Regression] " paolo.carlini at oracle dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cas43 at cs dot stanford.edu @ 2011-10-24 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50848
           Summary: ICE in derived template class missing using for member
                    of template base class
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: cas43@cs.stanford.edu


Created attachment 25588
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25588
Source file causing ICE

Compiling the attached source file causes g++ to ICE.

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

System type: 64-bit Ubuntu Linux

Compiler version:

$ /home/cas43/new-gcc/inst/bin/g++ -v
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) 

OUTPUT:

prog.cpp: In member function ‘void B<T>::f()’:
prog.cpp:2:53: error: there are no arguments to ‘u’ that depend on a template
parameter, so a declaration of ‘u’ must be available [-fpermissive]
prog.cpp:2:53: note: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
prog.cpp: In instantiation of ‘void B<T>::f() [with T = int]’:
prog.cpp:3:16:   required from here
prog.cpp:2:50: error: ‘u’ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
prog.cpp:2:50: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘indirect_ref’ 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.


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
@ 2011-10-24 14:30 ` paolo.carlini at oracle dot com
  2011-10-27  9:25 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-24 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-24
            Summary|ICE in derived template     |[4.7 Regression] ICE in
                   |class missing using for     |derived template class
                   |member of template base     |missing using for member of
                   |class                       |template base class
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-24 14:30:21 UTC ---
Only mainline ICEs.


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
  2011-10-24 14:30 ` [Bug c++/50848] [4.7 Regression] " paolo.carlini at oracle dot com
@ 2011-10-27  9:25 ` rguenth at gcc dot gnu.org
  2011-10-27 11:41 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-27  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
  2011-10-24 14:30 ` [Bug c++/50848] [4.7 Regression] " paolo.carlini at oracle dot com
  2011-10-27  9:25 ` rguenth at gcc dot gnu.org
@ 2011-10-27 11:41 ` rguenth at gcc dot gnu.org
  2011-10-30 10:30 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-27 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |ice-on-valid-code
           Priority|P3                          |P1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-27 11:41:17 UTC ---
With -fpermissive it doesn't error, without it it would be
ice-on-invalid-code, error-recovery


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
                   ` (2 preceding siblings ...)
  2011-10-27 11:41 ` rguenth at gcc dot gnu.org
@ 2011-10-30 10:30 ` paolo.carlini at oracle dot com
  2011-11-08  1:11 ` jason at gcc dot gnu.org
  2011-11-08  1:12 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-30 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-30 10:30:35 UTC ---
With -fpermissive ICEs for me, however:

50848.C: In member function ‘void B<T>::f()’:
50848.C:2:53: warning: there are no arguments to ‘u’ that depend on a template
parameter, so a declaration of ‘u’ must be available [-fpermissive]
50848.C: In instantiation of ‘void B<T>::f() [with T = int]’:
50848.C:3:16:   required from here
50848.C:2:50: warning: ‘u’ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
50848.C:2:50: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘indirect_ref’ in tsubst_copy_and_build, at
cp/pt.c:13529


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
                   ` (3 preceding siblings ...)
  2011-10-30 10:30 ` paolo.carlini at oracle dot com
@ 2011-11-08  1:11 ` jason at gcc dot gnu.org
  2011-11-08  1:12 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-11-08  1:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-08 01:10:48 UTC ---
Author: jason
Date: Tue Nov  8 01:10:43 2011
New Revision: 181143

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181143
Log:
    PR c++/50848
    * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Don't crash
    if lookup finds a non-function.

Added:
    trunk/gcc/testsuite/g++.dg/template/lookup9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/50848] [4.7 Regression] ICE in derived template class missing using for member of template base class
  2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
                   ` (4 preceding siblings ...)
  2011-11-08  1:11 ` jason at gcc dot gnu.org
@ 2011-11-08  1:12 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-11-08  1:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-08 01:11:23 UTC ---
Fixed.


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

end of thread, other threads:[~2011-11-08  1:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 10:28 [Bug c++/50848] New: ICE in derived template class missing using for member of template base class cas43 at cs dot stanford.edu
2011-10-24 14:30 ` [Bug c++/50848] [4.7 Regression] " paolo.carlini at oracle dot com
2011-10-27  9:25 ` rguenth at gcc dot gnu.org
2011-10-27 11:41 ` rguenth at gcc dot gnu.org
2011-10-30 10:30 ` paolo.carlini at oracle dot com
2011-11-08  1:11 ` jason at gcc dot gnu.org
2011-11-08  1:12 ` 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).