public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3820: GCC 3.0 crashes with empty base class
@ 2001-08-07  6:58 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-08-07  6:58 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, helmut.zeisel, nathan

Synopsis: GCC 3.0 crashes with empty base class

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Tue Aug  7 06:58:56 2001
State-Changed-Why:
    fixed for 3.0.1
    2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/3820
    	Stop using TYPE_NONCOPIED_PARTS.
    	* call.c (build_over_call): Be careful when copy constructing
    	or assigning to an empty class.
    	* class.c (check_bases_and_members): It has a
    	COMPLEX_ASSIGN_REF if it has a vptr.
    	(layout_class_type): Don't add empty class padding to
    	TYPE_NONCOPIED_PARTS.
    	(finish_struct_1): Don't add the VFIELD either.
    	* cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
    	initialization.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3820&database=gcc


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

* Re: c++/3820: GCC 3.0 crashes with empty base class
@ 2001-07-31  7:52 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-07-31  7:52 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, helmut.zeisel, nathan, nobody

Synopsis: GCC 3.0 crashes with empty base class

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Tue Jul 31 07:52:13 2001
Responsible-Changed-Why:
    working on patch

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3820&database=gcc


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

* Re: c++/3820: GCC 3.0 crashes with empty base class
@ 2001-07-31  6:56 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2001-07-31  6:56 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, helmut.zeisel, nobody

Synopsis: GCC 3.0 crashes with empty base class

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Tue Jul 31 06:56:23 2001
State-Changed-Why:
    confirmed as a bug & regression

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3820&database=gcc


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

* c++/3820: GCC 3.0 crashes with empty base class
@ 2001-07-25 13:36 helmut.zeisel
  0 siblings, 0 replies; 4+ messages in thread
From: helmut.zeisel @ 2001-07-25 13:36 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3820
>Category:       c++
>Synopsis:       GCC 3.0 crashes with empty base class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 25 13:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Helmut Zeisel
>Release:        3.0
>Organization:
>Environment:
Linux 2.2.X (SuSE)
>Description:
"c++ mytest.cpp; a.out" compiled with GCC 3.0 / Linux crashes.


>How-To-Repeat:
                    class empty_base
                    {
                    #ifdef NONEMPTY
                      int i;
                    #endif
                    };

                    template <class T, class B = empty_base>
                    struct multipliable1 : B
                    {
                         friend T operator*(T x, const T& y) { return x *= y; }
                    };

                    class A : multipliable1<A >
                    {
                    public:
                      A(int n) {m_v.push_back(0);}

                      A& operator*=(const A& other) {return *this;}
                    private:
                      std::vector<int> m_v;
                    };


                    int main()
                    { 
                      A a(1);   
                      A(1)*A(1);
                      a=1;
                      return 0;
                    }

>Fix:
"c++ -DNONEMPTY mytest.cpp; a.out" works.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-08-07  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-07  6:58 c++/3820: GCC 3.0 crashes with empty base class nathan
  -- strict thread matches above, loose matches on Subject: below --
2001-07-31  7:52 nathan
2001-07-31  6:56 nathan
2001-07-25 13:36 helmut.zeisel

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).