public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14964] New: internal compiler error on legal code
@ 2004-04-15 12:25 sascha dot krissler at web dot de
  2004-04-15 12:40 ` [Bug c++/14964] " sascha dot krissler at web dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sascha dot krissler at web dot de @ 2004-04-15 12:25 UTC (permalink / raw)
  To: gcc-bugs

The code is legal i think, there is no error where the ICE is reported
and all legal code around i think. i dont understand a bit about gcc internals.

-- 
           Summary: internal compiler error on legal code
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sascha dot krissler at web dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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


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

* [Bug c++/14964] internal compiler error on legal code
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
@ 2004-04-15 12:40 ` sascha dot krissler at web dot de
  2004-04-15 12:42 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sascha dot krissler at web dot de @ 2004-04-15 12:40 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


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


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

* [Bug c++/14964] internal compiler error on legal code
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
  2004-04-15 12:40 ` [Bug c++/14964] " sascha dot krissler at web dot de
@ 2004-04-15 12:42 ` pinskia at gcc dot gnu dot org
  2004-04-15 13:14 ` sascha dot krissler at web dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-15 12:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-15 12:27 -------
Can attach the code?  Also can ou read http://gcc.gnu.org/bugs.html?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug c++/14964] internal compiler error on legal code
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
  2004-04-15 12:40 ` [Bug c++/14964] " sascha dot krissler at web dot de
  2004-04-15 12:42 ` pinskia at gcc dot gnu dot org
@ 2004-04-15 13:14 ` sascha dot krissler at web dot de
  2004-04-15 13:22 ` sascha dot krissler at web dot de
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sascha dot krissler at web dot de @ 2004-04-15 13:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sascha dot krissler at web dot de  2004-04-15 12:45 -------
seems to happen only with -g.
trying to get the code working without -g.

-- 


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


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

* [Bug c++/14964] internal compiler error on legal code
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
                   ` (2 preceding siblings ...)
  2004-04-15 13:14 ` sascha dot krissler at web dot de
@ 2004-04-15 13:22 ` sascha dot krissler at web dot de
  2004-04-15 14:42 ` pinskia at gcc dot gnu dot org
  2004-04-15 19:22 ` [Bug c++/14964] ICE on missing "template" bangerth at dealii dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sascha dot krissler at web dot de @ 2004-04-15 13:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sascha dot krissler at web dot de  2004-04-15 13:13 -------
/usr/lib/dispatch/dispatch.cpp/Dispatch/Inherit.hpp: In instantiation of 
`Dispatch::Inherit<Instance::Config>':
/usr/lib/dispatch/dispatch.cpp/Dispatch/Environment.hpp:82:   instantiated from 
`Dispatch::Environment<Instance::Config>'
Environment.cpp:4:   instantiated from here
/usr/lib/dispatch/dispatch.cpp/Dispatch/Inherit.hpp:158: internal compiler 
error: in
   is_base_type, at dwarf2out.c:7871
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 


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


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

* [Bug c++/14964] internal compiler error on legal code
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
                   ` (3 preceding siblings ...)
  2004-04-15 13:22 ` sascha dot krissler at web dot de
@ 2004-04-15 14:42 ` pinskia at gcc dot gnu dot org
  2004-04-15 19:22 ` [Bug c++/14964] ICE on missing "template" bangerth at dealii dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-15 14:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-15 14:06 -------
You are missing a large number of template keywords.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code


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


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

* [Bug c++/14964] ICE on missing "template"
  2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
                   ` (4 preceding siblings ...)
  2004-04-15 14:42 ` pinskia at gcc dot gnu dot org
@ 2004-04-15 19:22 ` bangerth at dealii dot org
  5 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-04-15 19:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-04-15 18:06 -------
This is already fixed. Here's a smaller testcase: 
--------------------- 
#include <vector> 
 
template <typename> 
struct S { 
    template <typename T> 
    struct vector : std::vector<T> {}; 
}; 
 
template <typename T> 
struct X : std::vector<int> { 
    typedef typename S<T>::vector<int>::iterator iterator; 
}; 
 
template <typename T> 
void foo(X<T> &x) { 
  typename X<T>::iterator i;  
  i != x.end(); 
} 
 
template 
void foo(X<int> &x); 
---------------------------- 
Note the missing "template" in line 11. This gives: 
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc 
x.cc: In function `void foo(X<T>&) [with T = int]': 
x.cc:21:   instantiated from here 
x.cc:16: error: `i' has incomplete type 
x.cc:16: error: storage size of `i' isn't known 
x.cc:21:   instantiated from here 
x.cc:17: internal compiler error: in arg_assoc_type, at cp/decl2.c:4339 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
This is fixed in 3.4 and mainline: 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc:11: error: non-template `vector' used as template 
x.cc:11: error: (use `S< <template-parameter-1-1> >::template vector' to 
indicate that it is a template) 
x.cc:11: error: declaration does not declare anything 
 
That's actually a pretty good error message! 
 
The whole thing compiles, though, if I add the missing "template", which 
also has to be expected. 
 
Previous compilers also ICEd on this, so this is not a regression. I thus 
close it as "fixed". 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
      Known to fail|                            |2.95.3 3.2.3 3.3.3
      Known to work|                            |3.4.0 3.5.0
         Resolution|                            |FIXED
            Summary|internal compiler error on  |ICE on missing "template"
                   |legal code                  |
   Target Milestone|---                         |3.4.0


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


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

end of thread, other threads:[~2004-04-15 18:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-15 12:25 [Bug c++/14964] New: internal compiler error on legal code sascha dot krissler at web dot de
2004-04-15 12:40 ` [Bug c++/14964] " sascha dot krissler at web dot de
2004-04-15 12:42 ` pinskia at gcc dot gnu dot org
2004-04-15 13:14 ` sascha dot krissler at web dot de
2004-04-15 13:22 ` sascha dot krissler at web dot de
2004-04-15 14:42 ` pinskia at gcc dot gnu dot org
2004-04-15 19:22 ` [Bug c++/14964] ICE on missing "template" bangerth at dealii dot 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).