[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-12 Thread gerald at pfeifer dot com


--- Comment #25 from gerald at pfeifer dot com  2007-10-12 15:40 ---
Confirming as fixed on i386-unknown-freebsd54, the originally failing
platform.


-- 

gerald at pfeifer dot com changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-12 Thread zadeck at naturalbridge dot com


--- Comment #24 from zadeck at naturalbridge dot com  2007-10-12 14:38 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
  Segmentation fault, wrong code with -fomit-frame-pointer

Eric Botcazou wrote:
 2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

 PR middle-end/33676
 * global.c (build_insn_chain): Include insn that occur between
 basic blocks.
 

 Who approved this patch?

   
 However, the reload_insn_chain actually needs the insns that appear
 between basic blocks, in particular the labels in front of branch
 tables.  I added code here to check for insns that may be in front of a
 basic block after scanning that block.

 There are a lot of ways that I could have done this, for instance, I
 could have just written in terms of the PREV_INSN as the old code was.
 I think that in doing it the way that i have done it, it is obvious what
 needs to be done if someone really does get rid of the branch tables
 between the blocks.
 

 Sure, but the code in build_insn_chain is now more convoluted than in the 
 original version (and twice as big).  And, please, fix the formatting.

   
it was approved by seonbae, a register allocation reviewer.The
reason that it is longer is that it is more precise.  The code to
properly handle subregs, as well as properly dealing with registers live
thru insns,  accounts for most of the expansion over the old code.

formatting fixes committed as revision 129262.

kenny
Index: global.c
===
--- global.c(revision 129260)
+++ global.c(working copy)
@@ -1358,6 +1358,8 @@ mark_elimination (int from, int to)
 }
 }

+/* Print chain C to FILE.  */
+
 static void
 print_insn_chain (FILE *file, struct insn_chain *c)
 {
@@ -1366,6 +1368,9 @@ print_insn_chain (FILE *file, struct ins
   bitmap_print (file, c-dead_or_set, dead_or_set: , \n);
 }

+
+/* Print all reload_insn_chains to FILE.  */
+
 static void
 print_insn_chains (FILE *file)
 {
@@ -1373,8 +1378,11 @@ print_insn_chains (FILE *file)
   for (c = reload_insn_chain; c ; c = c-next)
 print_insn_chain (file, c);
 }
+
+
 /* Walk the insns of the current function and build reload_insn_chain,
and record register life information.  */
+
 static void
 build_insn_chain (void)
 {
@@ -1450,7 +1458,7 @@ build_insn_chain (void)
  {
if (regno  FIRST_PSEUDO_REGISTER)
  {
-   if (! fixed_regs[regno])
+   if (!fixed_regs[regno])
  bitmap_set_bit (c-dead_or_set, regno);
  }
else if (reg_renumber[regno] = 0)
@@ -1461,16 +1469,20 @@ build_insn_chain (void)
 (!DF_REF_FLAGS_IS_SET (def, DF_REF_CONDITIONAL)))
  {
rtx reg = DF_REF_REG (def);
+
/* We can model subregs, but not if they are
   wrapped in ZERO_EXTRACTS.  */
if (GET_CODE (reg) == SUBREG
 !DF_REF_FLAGS_IS_SET (def, DF_REF_EXTRACT))
  {
unsigned int start = SUBREG_BYTE (reg);
-   unsigned int last = start + GET_MODE_SIZE (GET_MODE
(reg));
+   unsigned int last = start 
+ + GET_MODE_SIZE (GET_MODE (reg));

-   ra_init_live_subregs (bitmap_bit_p
(live_relevant_regs, regno), 
- live_subregs,
live_subregs_used,
+   ra_init_live_subregs (bitmap_bit_p
(live_relevant_regs, 
+   regno), 
+ live_subregs, 
+ live_subregs_used,
  regno, reg);
/* Ignore the paradoxical bits.  */
if ((int)last  live_subregs_used[regno])
@@ -1535,7 +1547,7 @@ build_insn_chain (void)
  {
if (regno  FIRST_PSEUDO_REGISTER)
  {
-   if (! fixed_regs[regno])
+   if (!fixed_regs[regno])
  bitmap_set_bit (c-dead_or_set, regno);
  }
else if (reg_renumber[regno] = 0)
@@ -1548,10 +1560,13 @@ build_insn_chain (void)
 !DF_REF_FLAGS_IS_SET (use, DF_REF_EXTRACT)) 
  {
unsigned int start = SUBREG_BYTE (reg);
-   unsigned int last = start + GET_MODE_SIZE (GET_MODE
(reg));
+   unsigned int last = start 
+ + GET_MODE_SIZE (GET_MODE 

[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-12 Thread ebotcazou at libertysurf dot fr


--- Comment #23 from ebotcazou at libertysurf dot fr  2007-10-12 12:56 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22: 
Segmentation fault, wrong code with -fomit-frame-pointer

 2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

 PR middle-end/33676
 * global.c (build_insn_chain): Include insn that occur between
 basic blocks.

Who approved this patch?

 However, the reload_insn_chain actually needs the insns that appear
 between basic blocks, in particular the labels in front of branch
 tables.  I added code here to check for insns that may be in front of a
 basic block after scanning that block.

 There are a lot of ways that I could have done this, for instance, I
 could have just written in terms of the PREV_INSN as the old code was.
 I think that in doing it the way that i have done it, it is obvious what
 needs to be done if someone really does get rid of the branch tables
 between the blocks.

Sure, but the code in build_insn_chain is now more convoluted than in the 
original version (and twice as big).  And, please, fix the formatting.


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-12 Thread zadeck at naturalbridge dot com


--- Comment #22 from zadeck at naturalbridge dot com  2007-10-12 11:59 
---
it seems to be clean now.


-- 

zadeck at naturalbridge dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread ebotcazou at gcc dot gnu dot org


--- Comment #13 from ebotcazou at gcc dot gnu dot org  2007-10-11 11:14 
---
 Revision 128957 causes this regression.

There is a suspect non-documented hunk in the commit:

* reload1.c (compute_use_by_pseudos): Change DF_RA_LIVE
usage to DF_LIVE usage.

--- trunk/gcc/reload1.c 2007/10/02 12:47:13 128956
+++ trunk/gcc/reload1.c 2007/10/02 13:10:07 128957
@@ -548,7 +548,7 @@
   if (r  0)
{
  /* reload_combine uses the information from
-DF_RA_LIVE_IN (BASIC_BLOCK), which might still
+DF_LIVE_IN (BASIC_BLOCK), which might still
 contain registers that have not actually been allocated
 since they have an equivalence.  */
  gcc_assert (reload_completed);
@@ -1158,10 +1158,7 @@

   if (! frame_pointer_needed)
 FOR_EACH_BB (bb)
-  {
-   bitmap_clear_bit (df_get_live_in (bb), HARD_FRAME_POINTER_REGNUM);
-   bitmap_clear_bit (df_get_live_top (bb), HARD_FRAME_POINTER_REGNUM);
-  }
+  bitmap_clear_bit (df_get_live_in (bb), HARD_FRAME_POINTER_REGNUM);

   /* Come here (with failure set nonzero) if we can't get enough spill
  regs.  */


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu dot
   ||org


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread zadeck at naturalbridge dot com


--- Comment #14 from zadeck at naturalbridge dot com  2007-10-11 11:43 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
 Segmentation fault, wrong code with -fomit-frame-pointer

ebotcazou at gcc dot gnu dot org wrote:
 --- Comment #13 from ebotcazou at gcc dot gnu dot org  2007-10-11 11:14 
 ---
   
 Revision 128957 causes this regression.
 

 There is a suspect non-documented hunk in the commit:

 * reload1.c (compute_use_by_pseudos): Change DF_RA_LIVE
 usage to DF_LIVE usage.

 --- trunk/gcc/reload1.c 2007/10/02 12:47:13 128956
 +++ trunk/gcc/reload1.c 2007/10/02 13:10:07 128957
 @@ -548,7 +548,7 @@
if (r  0)
 {
   /* reload_combine uses the information from
 -DF_RA_LIVE_IN (BASIC_BLOCK), which might still
 +DF_LIVE_IN (BASIC_BLOCK), which might still
  contain registers that have not actually been allocated
  since they have an equivalence.  */
   gcc_assert (reload_completed);
 @@ -1158,10 +1158,7 @@

if (! frame_pointer_needed)
  FOR_EACH_BB (bb)
 -  {
 -   bitmap_clear_bit (df_get_live_in (bb), HARD_FRAME_POINTER_REGNUM);
 -   bitmap_clear_bit (df_get_live_top (bb), HARD_FRAME_POINTER_REGNUM);
 -  }
 +  bitmap_clear_bit (df_get_live_in (bb), HARD_FRAME_POINTER_REGNUM);

/* Come here (with failure set nonzero) if we can't get enough spill
   regs.  */


   

That is fine, there are no top sets anymore.

the problem is the code that builds the reload insn chain.  the new code
uses the cfg and does not add the label or the jump table that lives
between basic blocks to the chain.  I will post a patch as soon as my
tests finish.

kenny


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread ebotcazou at gcc dot gnu dot org


--- Comment #15 from ebotcazou at gcc dot gnu dot org  2007-10-11 12:24 
---
 That is fine, there are no top sets anymore.

Thanks for the explanation, please fix the ChangeLog though.

 the problem is the code that builds the reload insn chain.  the new code
 uses the cfg and does not add the label or the jump table that lives
 between basic blocks to the chain.  I will post a patch as soon as my
 tests finish.

OK.


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread zadeck at naturalbridge dot com


--- Comment #16 from zadeck at naturalbridge dot com  2007-10-11 12:40 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
 Segmentation fault, wrong code with -fomit-frame-pointer

ebotcazou at gcc dot gnu dot org wrote:
 --- Comment #15 from ebotcazou at gcc dot gnu dot org  2007-10-11 12:24 
 ---
   
 That is fine, there are no top sets anymore.
 

 Thanks for the explanation, please fix the ChangeLog though.
   
I will, sorry for the oversight.
   
 the problem is the code that builds the reload insn chain.  the new code
 uses the cfg and does not add the label or the jump table that lives
 between basic blocks to the chain.  I will post a patch as soon as my
 tests finish.
 

 OK.


   


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread zadeck at naturalbridge dot com


--- Comment #17 from zadeck at naturalbridge dot com  2007-10-11 16:21 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
 Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* global.c (build_insn_chain): Include insn that occur between
basic blocks.

2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* gcc.c-torture/gcc.dg/torture/pr33676.c: New.



When I rewrote this code to use backward scanning rather than forwards
scanning, I converted it to properly use the cfg, since it is generally
considered outmoded to just scan the insns.

However, the reload_insn_chain actually needs the insns that appear
between basic blocks, in particular the labels in front of branch
tables.  I added code here to check for insns that may be in front of a
basic block after scanning that block. 

There are a lot of ways that I could have done this, for instance, I
could have just written in terms of the PREV_INSN as the old code was. 
I think that in doing it the way that i have done it, it is obvious what
needs to be done if someone really does get rid of the branch tables
between the blocks.

This has been bootstrapped and regression tested on x86-{64,32} ppc-32,
and ia-64.  However it is not clear to me how many platforms use this
kind of table branch.  The bug appears to only be on the -march=i586, so
the reviewers may wish to comment on my choice of dg options on the test. 


Ok to commit?

Kenny
Index: testsuite/gcc.dg/torture/pr33676.c
===
--- testsuite/gcc.dg/torture/pr33676.c  (revision 0)
+++ testsuite/gcc.dg/torture/pr33676.c  (revision 0)
@@ -0,0 +1,53 @@
+/* { dg-do run } */ 
+/* { dg-options -march=i586 -fomit-frame-pointer { target { { i?86-*-*
x86_64-*-* }  ilp32 } } } */
+
+// Small testcase, compile with -march=i586 -O0 -fomit-frame-pointer:
+
+__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
+{
+  __builtin_abort ();
+}
+
+__attribute__((noinline)) int f (int k)
+{
+  return k;
+}
+
+__attribute__((noinline)) int g (int t, int k)
+{
+  int b;
+
+  switch (t)
+{
+case 0:
+  abrt (__FILE__, __FUNCTION__);
+
+case 1:
+  b = f (k);
+  break;
+
+case 2:
+  b = f (k);
+  break;
+
+case 3:
+  b = f (k);
+  break;
+
+case 4:
+  b = f (k);
+  break;
+
+default:
+  abrt (__FILE__, __FUNCTION__);
+}
+
+  return b;
+}
+
+int main (void)
+{
+  if (g (3, 1337) != 1337)
+  abrt (__FILE__, __FUNCTION__);
+  return 0;
+}
Index: global.c
===
--- global.c(revision 129224)
+++ global.c(working copy)
@@ -1575,6 +1575,37 @@ build_insn_chain (void)
  }
}
}
+
+  /* FIXME!! The following code is a disaster.  Reload needs to see the
+labels and jump tables that are just hanging out in between
+the basic blocks.  See pr33676.  */
+
+  insn = BB_HEAD (bb);
+
+  /* Skip over the barriers and cruft.  */
+  while (insn  (BARRIER_P (insn) || NOTE_P (insn) || BLOCK_FOR_INSN
(insn) == bb))
+   insn = PREV_INSN (insn);
+   
+  /* Look for labels and jump tables.  */
+  while (insn)
+   {
+ if (!NOTE_P (insn)  !BARRIER_P (insn))
+   {
+ if (BLOCK_FOR_INSN (insn))
+   break;
+
+ c = new_insn_chain ();
+ c-next = next;
+ next = c;
+ *p = c;
+ p = c-prev;
+ 
+ c-insn = insn;
+ c-block = bb-index;
+ bitmap_copy (c-live_throughout, live_relevant_regs);
+   } 
+ insn = PREV_INSN (insn);
+   }
 }

   for (i = 0; i  (unsigned int)max_regno; i++)


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread belyshev at depni dot sinp dot msu dot ru


--- Comment #18 from belyshev at depni dot sinp dot msu dot ru  2007-10-11 
19:52 ---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22: 
Segmentation fault, wrong code with -fomit-frame-pointer

Kenneth Zadeck [EMAIL PROTECTED] writes:

 2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

 PR middle-end/33676
 * global.c (build_insn_chain): Include insn that occur between
 basic blocks.

 2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

 PR middle-end/33676
 * gcc.c-torture/gcc.dg/torture/pr33676.c: New.
^^ typo, should be:

  * gcc.dg/torture/pr33676.c: New.

 Kenny
 Index: testsuite/gcc.dg/torture/pr33676.c
 ===
 --- testsuite/gcc.dg/torture/pr33676.c(revision 0)
 +++ testsuite/gcc.dg/torture/pr33676.c(revision 0)
 @@ -0,0 +1,53 @@
 +/* { dg-do run } */ 
 +/* { dg-options -march=i586 -fomit-frame-pointer { target { { i?86-*-* 
 x86_64-*-* }  ilp32 } } } */
^ better use -march=i386 so testcase wont fail
with SIGILL on i486 machines in case (if ever)
anyone will try to test gcc there.

 +// Small testcase, compile with -march=i586 -O0 -fomit-frame-pointer:
omit this comment to keep it cleaner and smaller. :)


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread zadeck at gcc dot gnu dot org


--- Comment #19 from zadeck at gcc dot gnu dot org  2007-10-11 22:32 ---
Subject: Bug 33676

Author: zadeck
Date: Thu Oct 11 22:31:55 2007
New Revision: 129244

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129244
Log:
2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* global.c (build_insn_chain): Include insn that occur between
basic blocks.

2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* gcc.dg/torture/pr33676.c: New.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr33676.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/global.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread zadeck at naturalbridge dot com


--- Comment #20 from zadeck at naturalbridge dot com  2007-10-11 22:35 
---
Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
 Segmentation fault, wrong code with -fomit-frame-pointer

zadeck at naturalbridge dot com wrote:
 --- Comment #17 from zadeck at naturalbridge dot com  2007-10-11 16:21 
 ---
 Subject: Re:  libgfortran bootstrap failure: selected_int_kind.f90:22:
  Segmentation fault, wrong code with -fomit-frame-pointer



 When I rewrote this code to use backward scanning rather than forwards
 scanning, I converted it to properly use the cfg, since it is generally
 considered outmoded to just scan the insns.

 However, the reload_insn_chain actually needs the insns that appear
 between basic blocks, in particular the labels in front of branch
 tables.  I added code here to check for insns that may be in front of a
 basic block after scanning that block. 

 There are a lot of ways that I could have done this, for instance, I
 could have just written in terms of the PREV_INSN as the old code was. 
 I think that in doing it the way that i have done it, it is obvious what
 needs to be done if someone really does get rid of the branch tables
 between the blocks.

 This has been bootstrapped and regression tested on x86-{64,32} ppc-32,
 and ia-64.  However it is not clear to me how many platforms use this
 kind of table branch.  The bug appears to only be on the -march=i586, so
 the reviewers may wish to comment on my choice of dg options on the test. 

   
2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* global.c (build_insn_chain): Include insn that occur between
basic blocks.

2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]

PR middle-end/33676
* gcc.dg/torture/pr33676.c: New.

bootstrapped and regression tested on x86-32 x86-64, ppc-32 and ia-64.

committed as revision 129244.

Kenny
Index: ChangeLog
===
--- ChangeLog   (revision 129243)
+++ ChangeLog   (working copy)
@@ -1,3 +1,9 @@
+2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]
+
+   PR middle-end/33676
+   * global.c (build_insn_chain): Include insn that occur between
+   basic blocks.
+   
 2007-10-11  Tom Tromey  [EMAIL PROTECTED]

* gengtype-yacc.y: Delete.
Index: testsuite/gcc.dg/torture/pr33676.c
===
--- testsuite/gcc.dg/torture/pr33676.c  (revision 0)
+++ testsuite/gcc.dg/torture/pr33676.c  (revision 0)
@@ -0,0 +1,51 @@
+/* { dg-do run } */ 
+/* { dg-options -march=i586 -fomit-frame-pointer { target { { i?86-*-*
x86_64-*-* }  ilp32 } } } */
+
+__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
+{
+  __builtin_abort ();
+}
+
+__attribute__((noinline)) int f (int k)
+{
+  return k;
+}
+
+__attribute__((noinline)) int g (int t, int k)
+{
+  int b;
+
+  switch (t)
+{
+case 0:
+  abrt (__FILE__, __FUNCTION__);
+
+case 1:
+  b = f (k);
+  break;
+
+case 2:
+  b = f (k);
+  break;
+
+case 3:
+  b = f (k);
+  break;
+
+case 4:
+  b = f (k);
+  break;
+
+default:
+  abrt (__FILE__, __FUNCTION__);
+}
+
+  return b;
+}
+
+int main (void)
+{
+  if (g (3, 1337) != 1337)
+  abrt (__FILE__, __FUNCTION__);
+  return 0;
+}
Index: testsuite/ChangeLog
===
--- testsuite/ChangeLog (revision 129243)
+++ testsuite/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2007-10-11  Kenneth Zadeck [EMAIL PROTECTED]
+
+   PR middle-end/33676
+   * gcc.dg/torture/pr33676.c: New.
+
 2007-10-11  Paolo Carlini  [EMAIL PROTECTED]

PR c++/31441
Index: global.c
===
--- global.c(revision 129243)
+++ global.c(working copy)
@@ -1575,6 +1575,41 @@ build_insn_chain (void)
  }
}
}
+
+  /* FIXME!! The following code is a disaster.  Reload needs to see the
+labels and jump tables that are just hanging out in between
+the basic blocks.  See pr33676.  */
+
+  insn = BB_HEAD (bb);
+
+  /* Skip over the barriers and cruft.  */
+  while (insn  (BARRIER_P (insn) || NOTE_P (insn) || BLOCK_FOR_INSN
(insn) == bb))
+   insn = PREV_INSN (insn);
+   
+  /* While we add anything except barriers and notes, the focus is
+to get the labels and jump tables into the
+reload_insn_chain.  */
+  while (insn)
+   {
+ if (!NOTE_P (insn)  !BARRIER_P (insn))
+   {
+ if (BLOCK_FOR_INSN (insn))
+   break;
+
+ c = new_insn_chain ();
+ c-next = next;
+ next = c;
+ *p = c;
+ p = c-prev;
+ 
+ c-insn = insn;
+ /* The block makes no sense here, but it is what the old
+code did.  */
+ 

[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-11 Thread kargl at gcc dot gnu dot org


--- Comment #21 from kargl at gcc dot gnu dot org  2007-10-12 04:07 ---
Kenny,

My build tonight's tree completed successfully.  I think this
PR can be close, but you may want to hear from Gerald first.


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-10 Thread belyshev at depni dot sinp dot msu dot ru


--- Comment #10 from belyshev at depni dot sinp dot msu dot ru  2007-10-10 
06:08 ---
This bug is not fixed by r129193


-- 

belyshev at depni dot sinp dot msu dot ru changed:

   What|Removed |Added

  Component|bootstrap   |rtl-optimization
   GCC host triplet|i386-unknown-freebsd5.4 |
 GCC target triplet||i386-*-*
   Keywords||build, wrong-code
   Last reconfirmed|2007-10-06 18:59:19 |2007-10-10 06:08:58
   date||
Summary|libgfortran bootstrap   |libgfortran bootstrap
   |failure:|failure:
   |selected_int_kind.f90:22:   |selected_int_kind.f90:22:
   |Segmentation fault  |Segmentation fault, wrong
   ||code with -fomit-frame-
   ||pointer
   Target Milestone|--- |4.3.0


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-10 Thread ubizjak at gmail dot com


--- Comment #11 from ubizjak at gmail dot com  2007-10-10 07:59 ---
(In reply to comment #9)
 Revision 128957 causes this regression.

I can confirm that r128956 bootstraps OK when configured with
--build=i386-pc-linux-gnu. Also, r128956 compiles and runs testcase from
comment #8 without problems.


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-10 Thread zadeck at naturalbridge dot com


--- Comment #12 from zadeck at naturalbridge dot com  2007-10-10 11:41 
---
I will look at it today.


-- 


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



[Bug rtl-optimization/33676] libgfortran bootstrap failure: selected_int_kind.f90:22: Segmentation fault, wrong code with -fomit-frame-pointer

2007-10-10 Thread zadeck at naturalbridge dot com


-- 

zadeck at naturalbridge dot com changed:

   What|Removed |Added

  BugsThisDependsOn|33669   |
 AssignedTo|unassigned at gcc dot gnu   |zadeck at naturalbridge dot
   |dot org |com
 Status|NEW |ASSIGNED


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