public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
@ 2005-10-03 17:44 ` janis187 at us dot ibm dot com
  2005-10-06  0:52 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: janis187 at us dot ibm dot com @ 2005-10-03 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from janis187 at us dot ibm dot com  2005-10-03 17:44 -------
I can reproduce this reliably for powerpc64-linux with -m64 using the testcase
in comment #3; using -m32 the results are intermittent.

A regression hunt identified the following patch from hubicka@gcc.gnu.org:

  http://gcc.gnu.org/ml/gcc-cvs/2005-06/msg00665.html


-- 

janis187 at us dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
  2005-10-03 17:44 ` [Bug c++/23651] [4.1 Regression] ICE in GC janis187 at us dot ibm dot com
@ 2005-10-06  0:52 ` pinskia at gcc dot gnu dot org
  2005-10-06  1:21 ` [Bug middle-end/23651] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06  0:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2005-10-06 00:52 -------
Hmm, this is after cse2.


-- 


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
  2005-10-03 17:44 ` [Bug c++/23651] [4.1 Regression] ICE in GC janis187 at us dot ibm dot com
  2005-10-06  0:52 ` pinskia at gcc dot gnu dot org
@ 2005-10-06  1:21 ` pinskia at gcc dot gnu dot org
  2005-10-06  1:28 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06  1:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2005-10-06 01:21 -------
I have a fix for this bug, return_label and naked_return_label don't need to be
set after expand.  Hmm, maybe we could move them to global memory and not use
up 8-16 bytes in function.c since we never expand more than function at a time
now.
The simple patch is the following:
Index: cfgexpand.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgexpand.c,v
retrieving revision 2.50
diff -u -p -r2.50 cfgexpand.c
--- cfgexpand.c 6 Aug 2005 13:25:56 -0000       2.50
+++ cfgexpand.c 6 Oct 2005 01:18:05 -0000
@@ -1578,6 +1578,8 @@ tree_expand_cfg (void)
     (*debug_hooks->outlining_inline_function) (current_function_decl);

   TREE_ASM_WRITTEN (current_function_decl) = 1;
+  return_label = NULL;
+  naked_return_label = NULL;
 }

 struct tree_opt_pass pass_expand =


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
          Component|c++                         |middle-end


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-06  1:21 ` [Bug middle-end/23651] " pinskia at gcc dot gnu dot org
@ 2005-10-06  1:28 ` pinskia at gcc dot gnu dot org
  2005-10-06 15:06 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06  1:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2005-10-06 01:28 -------
(In reply to comment #6)
> I can reproduce this reliably for powerpc64-linux with -m64 using the testcase
> in comment #3; using -m32 the results are intermittent.
> 
> A regression hunt identified the following patch from hubicka@gcc.gnu.org:

Hmm, looks like that patch just exposed a latent bug as proved by my patch, I
would be it could be reproduced before his patch, just a bit harder as his
patch caused BB to be smaller which got it put in a different page.


-- 


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-10-06  1:28 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 15:06 ` pinskia at gcc dot gnu dot org
  2005-10-06 22:14 ` pinskia at gcc dot gnu dot org
  2005-10-06 22:14 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 15:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2005-10-06 15:06 -------
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00280.html


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |10/msg00280.html
           Keywords|                            |patch


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-10-06 15:06 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 22:14 ` pinskia at gcc dot gnu dot org
  2005-10-06 22:14 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2005-10-06 22:14 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
       [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2005-10-06 22:14 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 22:14 ` cvs-commit at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-06 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from cvs-commit at gcc dot gnu dot org  2005-10-06 22:14 -------
Subject: Bug 23651

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     pinskia@gcc.gnu.org     2005-10-06 22:14:37

Modified files:
        gcc            : ChangeLog cfgexpand.c 

Log message:
        2005-10-06  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/22216
        PR middle-end/23651
        * cfgexpand.c (tree_expand_cfg): After expanding the functions, clear
        out return_label and naked_return_label.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10110&r2=2.10111
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgexpand.c.diff?cvsroot=gcc&r1=2.50&r2=2.51


-- 


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
  2005-08-31  9:44 [Bug c++/23651] New: " snyder at fnal dot gov
  2005-08-31 13:36 ` [Bug middle-end/23651] [4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-08-31 16:00 ` pinskia at gcc dot gnu dot org
@ 2005-09-16 19:59 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-16 19:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-16 19:59 -------
Rereducing on the mainline for x86_64-pc-linux with -m32.

-- 


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
  2005-08-31  9:44 [Bug c++/23651] New: " snyder at fnal dot gov
  2005-08-31 13:36 ` [Bug middle-end/23651] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-31 16:00 ` pinskia at gcc dot gnu dot org
  2005-09-16 19:59 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 16:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


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

* [Bug middle-end/23651] [4.1 Regression] ICE in GC
  2005-08-31  9:44 [Bug c++/23651] New: " snyder at fnal dot gov
@ 2005-08-31 13:36 ` pinskia at gcc dot gnu dot org
  2005-08-31 16:00 ` pinskia at gcc dot gnu dot org
  2005-09-16 19:59 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 13:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-31 13:28 -------
Confirmed, reduced testcase:
namespace std
{
  struct allocator
  {
    ~allocator() throw(){}
  };
  struct string    
  {
    struct _Alloc_hider : allocator {};
    _Alloc_hider _M_dataplus;
    string();
    string(const char* __s, const allocator& __a = allocator());
  };
}
struct Strptrmap
{
  bool insert (const std::string& key, unsigned val){}
};
struct Indptr_Base
{
  virtual ~Indptr_Base ();
  void decref ();
  unsigned short _refcount;
};
inline void Indptr_Base::decref ()
{
  if (_refcount == 2)
    delete this;
  else
    _refcount -= 2;
}
struct d0_Ref_Base
{
  ~d0_Ref_Base ();
  bool is_null() const;
  void* ptr1 () const;
  mutable const void* _ptr;
  Indptr_Base* _indptr;
  Strptrmap* operator->() const;
};
inline d0_Ref_Base::~d0_Ref_Base ()
{
  if (_indptr)
    _indptr->decref ();
}
inline bool d0_Ref_Base::is_null () const
{
  return (_ptr == 0 && _indptr == 0);
}
inline Strptrmap* d0_Ref_Base::operator->() const
{
  if (is_null())     return 0;
  return reinterpret_cast<Strptrmap*> (ptr1 ());
}
int foo ()
{
  std::string fname;
  d0_Ref_Base hm1;
  for (int i = 0; i < 10;  i++)
    hm1->insert ("", 0);
  hm1->insert ("", 0);
  return 0;
}

---
It worked with 20050823.  Note my reduced testcase is from powerpc-darwin.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |middle-end
     Ever Confirmed|                            |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-31 13:28:51
               date|                            |
            Summary|ICE in GC                   |[4.1 Regression] ICE in GC
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-10-06 22:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
2005-10-03 17:44 ` [Bug c++/23651] [4.1 Regression] ICE in GC janis187 at us dot ibm dot com
2005-10-06  0:52 ` pinskia at gcc dot gnu dot org
2005-10-06  1:21 ` [Bug middle-end/23651] " pinskia at gcc dot gnu dot org
2005-10-06  1:28 ` pinskia at gcc dot gnu dot org
2005-10-06 15:06 ` pinskia at gcc dot gnu dot org
2005-10-06 22:14 ` pinskia at gcc dot gnu dot org
2005-10-06 22:14 ` cvs-commit at gcc dot gnu dot org
2005-08-31  9:44 [Bug c++/23651] New: " snyder at fnal dot gov
2005-08-31 13:36 ` [Bug middle-end/23651] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-31 16:00 ` pinskia at gcc dot gnu dot org
2005-09-16 19:59 ` pinskia 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).