public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Pop Sébastian" <pop@gauvain.u-strasbg.fr>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/7807: g++ 3.2 Fails to compile legal code that compiled OK with g++ 3.1
Date: Sat, 28 Sep 2002 22:56:00 -0000	[thread overview]
Message-ID: <20020929055600.20613.qmail@sources.redhat.com> (raw)

The following reply was made to PR c++/7807; it has been noted by GNATS.

From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr>
To: nathan@gcc.gnu.org, anthony@anthonyw.cjb.net, gcc-bugs@gcc.gnu.org,
	gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc: aoliva@redhat.com
Subject: Re: c++/7807: g++ 3.2 Fails to compile legal code that compiled OK with g++ 3.1
Date: Sun, 29 Sep 2002 07:50:28 +0200

 On Fri, Sep 13, 2002 at 08:35:36PM -0000, nathan@gcc.gnu.org wrote:
 > Synopsis: g++ 3.2 Fails to compile legal code that compiled OK with g++ 3.1
 > 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: nathan
 > State-Changed-When: Fri Sep 13 13:35:35 2002
 > State-Changed-Why:
 >     confirmed as a regression
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7807
 
 The bug was introduced with the following patch:
 
 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
 
 Patch for C++ uninitialized pointer-to-member value
 http://gcc.gnu.org/ml/gcc-patches/2002-05/msg01167.html
 
 
 Here is a simplified version of the original bug-example on which I worked:
 
 class RM
 {
   class U;
   U* (U::* s2);
 };
 
 class OP
 {
   int& f;
   RM pb;
   
 public:
   OP (int f_): f (f_) {}
 };
 
 int i=9;
 OP a(i);
 
 
 
 The following patch is a workaround that solves bug-reports 7648 and 7807.
 Alexandre, could you analyze further this problem?
 
 Thanks,
 Sebastian
 
 
 
 Index: decl.c
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v
 retrieving revision 1.936
 diff -d -u -p -r1.936 decl.c
 --- decl.c	21 Sep 2002 12:51:53 -0000	1.936
 +++ decl.c	29 Sep 2002 05:45:34 -0000
 @@ -7830,7 +7830,7 @@ check_initializer (decl, init)
      }
    else if (!DECL_EXTERNAL (decl) && !zero_init_p (type))
      {
 -      force_store_init_value (decl, build_forced_zero_init (type));
 +//      force_store_init_value (decl, build_forced_zero_init (type));
  
        if (init)
  	goto process_init;
 Index: typeck.c
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/gcc/cp/typeck.c,v
 retrieving revision 1.429
 diff -d -u -p -r1.429 typeck.c
 --- typeck.c	21 Sep 2002 12:51:56 -0000	1.429
 +++ typeck.c	29 Sep 2002 05:45:35 -0000
 @@ -5838,8 +5838,12 @@ convert_for_assignment (type, rhs, errty
    rhstype = TREE_TYPE (rhs);
    coder = TREE_CODE (rhstype);
  
 -  if (rhs == error_mark_node || rhstype == error_mark_node)
 +  if (rhs == error_mark_node)
 +    return error_mark_node;
 +  
 +  if (rhstype == error_mark_node)
      return error_mark_node;
 +      
    if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node)
      return error_mark_node;
  


             reply	other threads:[~2002-09-29  5:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-28 22:56 Pop Sébastian [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-16 12:41 mmitchel
2002-09-13 13:35 nathan
2002-09-02  8:06 Andris Pavenis
2002-09-02  2:36 anthony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020929055600.20613.qmail@sources.redhat.com \
    --to=pop@gauvain.u-strasbg.fr \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).