public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16929] New: ICE on taking address of member in default parameter to member function
@ 2004-08-09  9:32 niemayer at isg dot de
  2004-08-09  9:37 ` [Bug c++/16929] " niemayer at isg dot de
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: niemayer at isg dot de @ 2004-08-09  9:32 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following tiny C++ code sample causes gcc-3.4.1 to crash:

-----------------------------------------------------
template <class T>
class A {
    int x;
};

template <class T>
class B {
protected:
    
    A<T> a;
    
    void f(const A<T> * a1 = &a);
    
    void g(void);
};

template <class T>
void B<T>::g(void) {
    f();
}

template class B<long>;
----------------------------------------------

Result when compiled:

bug.cxx: In instantiation of `void B<T>::g() [with T = long int]':
bug.cxx:23:   instantiated from here
bug.cxx:20: internal compiler error: Segmentation fault
Please submit a full bug report, 

I guess that the default parameter usage may be invalid code, but of course the
compiler shouldn't crash...

-- 
           Summary: ICE on taking address of member in default parameter to
                    member function
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: niemayer at isg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-10-13  9:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09  9:32 [Bug c++/16929] New: ICE on taking address of member in default parameter to member function niemayer at isg dot de
2004-08-09  9:37 ` [Bug c++/16929] " niemayer at isg dot de
2004-08-09  9:56 ` [Bug c++/16929] [3.4/3.5? Regression] " pinskia at gcc dot gnu dot org
2004-08-09 12:01 ` [Bug c++/16929] [3.4/3.5 " bangerth at dealii dot org
2004-08-11 22:13 ` cvs-commit at gcc dot gnu dot org
2004-08-11 22:15 ` cvs-commit at gcc dot gnu dot org
2004-08-11 22:20 ` mmitchel at gcc dot gnu dot org
2004-08-12 14:27 ` reichelt at gcc dot gnu dot org
2004-08-12 14:47 ` mark at codesourcery dot com
2004-08-12 15:10 ` reichelt at igpm dot rwth-aachen dot de
2004-08-12 17:44 ` mark at codesourcery dot com
2004-08-12 19:39 ` reichelt at gcc dot gnu dot org
2004-08-12 19:43 ` reichelt at gcc dot gnu dot org
2004-08-29 18:06 ` mmitchel at gcc dot gnu dot org
2004-10-12 12:48 ` [Bug c++/16929] [3.4/4.0 " pinskia at gcc dot gnu dot org
2004-10-13  9:43 ` reichelt at gcc dot gnu 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).