public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/27549]  New: [4.1 Regression] ICE in coalesce_abnormal_edges
@ 2006-05-11  8:44 jakub at gcc dot gnu dot org
  2006-05-11  8:48 ` [Bug tree-optimization/27549] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-11  8:44 UTC (permalink / raw)
  To: gcc-bugs

typedef __SIZE_TYPE__ size_t;

struct E
{
  virtual ~E () {}
  virtual size_t e () const = 0;
  virtual void f (char *x) const = 0;
};

struct F : public E
{
  virtual ~F () {}
  virtual size_t e () const { return 0; }
  virtual void f (char *x) const { *x = '\0'; }
};

struct S
{
  S () { a = new char[32]; b = 32; c = 0; a[0] = 0; }
  void s (const char *x, size_t y) { v (c + y + 1); __builtin_memcpy(a + c, x,
y); c += y; a[c] = '\0'; }
  void s (const E *x) { size_t l = x->e(); v (c + l + 1); x->f (a + c); c += l;
}
  const char *t () { return a; }
  void v (size_t n)
    {
      if (b >= n) return;

      size_t b2 = b;
      char *a2 = a;

      for (;;)
        {
          b *= 2;
          if (b >= n)
            break;
        }

      a = new char[b];

      if (b2)
        {
          __builtin_memcpy(a, a2, c);
          a2[0] = 0;
          for (size_t i = 1; i < b2; i++)
            a2[i] = a2[i - 1];
          delete[] a2;
        }
    }

  ~S ()
    {
      if (b)
        {
          a[0] = 0;
          for (size_t i = 1; i < b; i++)
            a[i] = a[i - 1];
        }
      delete[] a;
    }
  char * a;
  size_t b, c;
};

const char *p;
size_t q;
const F u;

const char *
foo ()
{
  S s;
  s.s (p, q);
  s.s (&u);
  return s.t ();
}

ICEs at -O{1,2,3} in coalesce_abnormal_edges, at least on x86_64 and i386
linux.


-- 
           Summary: [4.1 Regression] ICE in coalesce_abnormal_edges
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
@ 2006-05-11  8:48 ` pinskia at gcc dot gnu dot org
  2006-05-11  8:51 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-11  8:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-11 08:48 -------
This worked in "4.1.0 20060208" and in "4.1.0 20051026".


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
  2006-05-11  8:48 ` [Bug tree-optimization/27549] " pinskia at gcc dot gnu dot org
@ 2006-05-11  8:51 ` pinskia at gcc dot gnu dot org
  2006-05-11  9:06 ` jakub at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-11  8:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-11 08:50 -------
Does the patch for PR 27283 fix this?


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
  2006-05-11  8:48 ` [Bug tree-optimization/27549] " pinskia at gcc dot gnu dot org
  2006-05-11  8:51 ` pinskia at gcc dot gnu dot org
@ 2006-05-11  9:06 ` jakub at gcc dot gnu dot org
  2006-05-11  9:07 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-11  9:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2006-05-11 09:06 -------
*** Bug 27550 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-11  9:07 ` jakub at gcc dot gnu dot org
@ 2006-05-11  9:07 ` jakub at gcc dot gnu dot org
  2006-05-12  4:48 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-11  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2006-05-11 09:07 -------
Yes, PR 27283 patch fixes this.  So, we need it on gcc-4_1-branch too...


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-11  9:06 ` jakub at gcc dot gnu dot org
@ 2006-05-11  9:07 ` jakub at gcc dot gnu dot org
  2006-05-11  9:07 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-11  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2006-05-11 09:06 -------
*** Bug 27551 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-11  9:07 ` jakub at gcc dot gnu dot org
@ 2006-05-12  4:48 ` pinskia at gcc dot gnu dot org
  2006-05-14 22:37 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-12  4:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-05-12 04:48 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |27283
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-12 04:48:25
               date|                            |
   Target Milestone|---                         |4.1.1


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-05-12  4:48 ` pinskia at gcc dot gnu dot org
@ 2006-05-14 22:37 ` mmitchel at gcc dot gnu dot org
  2006-05-15 10:10 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-14 22:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-05-14 22:37 ` mmitchel at gcc dot gnu dot org
@ 2006-05-15 10:10 ` jakub at gcc dot gnu dot org
  2006-05-15 10:11 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-15 10:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2006-05-15 10:10 -------
Created an attachment (id=11468)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11468&action=view)
gcc41-pr27549.patch


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-05-15 10:10 ` jakub at gcc dot gnu dot org
@ 2006-05-15 10:11 ` jakub at gcc dot gnu dot org
  2006-05-17  8:24 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-15 10:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2006-05-15 10:11 -------
Created an attachment (id=11469)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11469&action=view)
gcc41-pr27548.patch

These two patches fix this on the branch, bootstrapped/regtested on 7 linux
arches.  But, PR27548 fix hasn't been approved for the trunk yet, so I'll post
these 2 to gcc-patches only when that happens.


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-05-15 10:11 ` jakub at gcc dot gnu dot org
@ 2006-05-17  8:24 ` jakub at gcc dot gnu dot org
  2006-05-17  8:32 ` jakub at gcc dot gnu dot org
  2006-05-17  8:46 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-17  8:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2006-05-17 08:24 -------
Subject: Bug 27549

Author: jakub
Date: Wed May 17 08:23:55 2006
New Revision: 113843

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113843
Log:
        PR tree-optimization/27549
        Backported from mainline

        2006-05-01  Zdenek Dvorak  <dvorakz@suse.cz>

        PR tree-optimization/27283
        * tree-ssa-loop-ivopts.c (struct nfe_cache_elt): Store just trees,
        not whole # of iteration descriptions.
        (niter_for_exit): Return just # of iterations.  Fail if # of iterations
        uses abnormal ssa name.
        (niter_for_single_dom_exit): Ditto.
        (find_induction_variables, may_eliminate_iv): Expect niter_for_exit to
        return just the number of iterations.
        (add_iv_outer_candidates, may_replace_final_value): Likewise.

        * g++.dg/tree-ssa/pr27283.C: New test.
        * g++.dg/tree-ssa/pr27549.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr27283.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr27549.C
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree-ssa-loop-ivopts.c


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-05-17  8:24 ` jakub at gcc dot gnu dot org
@ 2006-05-17  8:32 ` jakub at gcc dot gnu dot org
  2006-05-17  8:46 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-17  8:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2006-05-17 08:32 -------
Subject: Bug 27549

Author: jakub
Date: Wed May 17 08:31:51 2006
New Revision: 113845

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113845
Log:
        PR tree-optimization/27549
        * g++.dg/tree-ssa/pr27549.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr27549.C
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug tree-optimization/27549] [4.1 Regression] ICE in coalesce_abnormal_edges
  2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-05-17  8:32 ` jakub at gcc dot gnu dot org
@ 2006-05-17  8:46 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-17  8:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2006-05-17 08:46 -------
Fixed in SVN.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-05-17  8:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11  8:44 [Bug tree-optimization/27549] New: [4.1 Regression] ICE in coalesce_abnormal_edges jakub at gcc dot gnu dot org
2006-05-11  8:48 ` [Bug tree-optimization/27549] " pinskia at gcc dot gnu dot org
2006-05-11  8:51 ` pinskia at gcc dot gnu dot org
2006-05-11  9:06 ` jakub at gcc dot gnu dot org
2006-05-11  9:07 ` jakub at gcc dot gnu dot org
2006-05-11  9:07 ` jakub at gcc dot gnu dot org
2006-05-12  4:48 ` pinskia at gcc dot gnu dot org
2006-05-14 22:37 ` mmitchel at gcc dot gnu dot org
2006-05-15 10:10 ` jakub at gcc dot gnu dot org
2006-05-15 10:11 ` jakub at gcc dot gnu dot org
2006-05-17  8:24 ` jakub at gcc dot gnu dot org
2006-05-17  8:32 ` jakub at gcc dot gnu dot org
2006-05-17  8:46 ` jakub 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).