public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Ada bootstrap fails on CVS mainline
@ 2002-10-26 12:31 Andreas Jaeger
  2002-10-26 15:39 ` Graham Stott
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 2002-10-26 12:31 UTC (permalink / raw)
  To: gcc



With current CVS I get on i686-linux-gnu:

$ stage1/xgcc -Bstage1/ -B/opt/gcc/3.3-devel/i686-pc-linux-gnu/bin/ -c -g -O2      -gnatpg -gnata -g -O1 -fno-inline  -I- -I. -Iada -I/cvs/gcc/gcc/ada /cvs/gcc/gcc/ada/a-except.adb -o ada/a-except.o -v
Reading specs from stage1/specs
Configured with: /cvs/gcc/configure --prefix=/opt/gcc/3.3-devel --disable-nls --enable-threads=posix --enable-clocale=gnu --enable-__cxa_atexit --enable-shared --enable-languages=c,c++,f77,java,objc,ada,treelang --enable-checking=misc,tree --with-system-zlib
Thread model: posix
gcc version 3.3 20021025 (experimental)
 stage1/gnat1 -I- -I. -Iada -I/cvs/gcc/gcc/ada -quiet -dumpbase a-except.adb -g -gnatpg -gnata -g -O2 -O1 -fno-inline -gnatO ada/a-except.o /cvs/gcc/gcc/ada/a-except.adb -o /tmp/cceEtPwa.s
+===========================GNAT BUG DETECTED==============================+
| 3.3 20021025 (experimental) (i686-pc-linux-gnu) Storage_Error stack overflow (or erroneous memory access)|
| Error detected at /cvs/gcc/gcc/ada/s-stoele.adb:36:20                    |
| Please submit bug report by email to gcc-bugs@gcc.gnu.org.               |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
| (use plain ASCII or MIME attachment).                                    |
| See gnatinfo.txt for full info on procedure for submitting bugs.         |
+==========================================================================+

Please include these source files with error report


compilation abandoned

gromit:/builds/gcc/misc/gcc:[1]$ gdb stage1/gnat1
GNU gdb 5.2
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-suse-linux"...
rBreakpoint 1 at 0x827e3b0: file /cvs/gcc/gcc/diagnostic.c, line 1363.
Breakpoint 2 at 0x8049860
Breakpoint 3 at 0x8049630
(gdb) r -I- -I. -Iada -I/cvs/gcc/gcc/ada -quiet -dumpbase a-except.adb -g -gnatpg -gnata -g -O2 -O1 -fno-inline -gnatO ada/a-except.o /cvs/gcc/gcc/ada/a-except.adb -o /tmp/cceEtPwa.s
Breakpoint 2 at 0x4006025d
Breakpoint 3 at 0x4005ee8f

Program received signal SIGSEGV, Segmentation fault.
0x082704c3 in init_alias_analysis () at /cvs/gcc/gcc/alias.c:2814
2814                      else if (REG_N_SETS (regno) == 1
(gdb) bt
#0  0x082704c3 in init_alias_analysis () at /cvs/gcc/gcc/alias.c:2814
#1  0x082e3af9 in life_analysis (f=0x403e8790, file=0x0, flags=383) at /cvs/gcc/gcc/flow.c:452
#2  0x084a3993 in rest_of_compilation (decl=0x402d9460) at /cvs/gcc/gcc/toplev.c:3061
#3  0x08072211 in end_subprog_body () at /cvs/gcc/gcc/ada/utils.c:1817
#4  0x08092229 in tree_transform (gnat_node=4686) at /cvs/gcc/gcc/ada/trans.c:2718
#5  0x080888bd in gnat_to_code (gnat_node=4686) at /cvs/gcc/gcc/ada/trans.c:232
#6  0x08097bd3 in process_decls (gnat_decls=-99999979, gnat_decls2=0, gnat_end_list=0, pass1p=1, pass2p=1) at /cvs/gcc/gcc/ada/trans.c:4344
#7  0x0809439a in tree_transform (gnat_node=1441) at /cvs/gcc/gcc/ada/trans.c:3169
#8  0x080888bd in gnat_to_code (gnat_node=1441) at /cvs/gcc/gcc/ada/trans.c:232
#9  0x0809455b in tree_transform (gnat_node=1363) at /cvs/gcc/gcc/ada/trans.c:3226
#10 0x080888bd in gnat_to_code (gnat_node=1363) at /cvs/gcc/gcc/ada/trans.c:232
#11 0x080888a1 in gigi (gnat_root=1363, max_gnat_node=20945, number_name=3361, nodes_ptr=0x4019b008, next_node_ptr=0x40353008, 
    prev_node_ptr=0x40384008, elists_ptr=0x8951d88, elmts_ptr=0x89523d0, strings_ptr=0x89b2520, string_chars_ptr=0x8a4a078, 
    list_headers_ptr=0x89d39b0, number_units=19, file_info_ptr=0xbfffee54 "0¦á\021", standard_integer=42, standard_long_long_float=66, 
    standard_exception_type=1033, gigi_operating_mode=0) at /cvs/gcc/gcc/ada/trans.c:215
internal error - unimplemented function unk_lang_create_fundamental_type called.
(gdb) p regno
$1 = 121
(gdb) p reg_n_info
$7 = 0x8992470
(gdb) p *reg_n_info
$8 = {num_elements = 126, elements_used = 0, type = VARRAY_DATA_REG, name = 0x8624d64 "reg_n_info", data = {c = "\200", uc = "\200", s = {-20864}, 
    us = {44672}, i = {144551552}, u = {144551552}, l = {144551552}, ul = {144551552}, hint = {144551552}, uhint = {144551552}, generic = {
      0x89dae80}, cptr = {0x89dae80 "Ñ"}, rtx = {0x89dae80}, rtvec = {0x89dae80}, tree = {0x89dae80}, bitmap = {0x89dae80}, reg = {0x89dae80}, 
    const_equiv = {{rtx = 0x89dae80, age = 144551596}}, bb = {0x89dae80}, te = {0x89dae80}}}

Any ideas?  Anything else I should send?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-26 12:31 Ada bootstrap fails on CVS mainline Andreas Jaeger
@ 2002-10-26 15:39 ` Graham Stott
  2002-10-27  3:48   ` Graham Stott
  0 siblings, 1 reply; 8+ messages in thread
From: Graham Stott @ 2002-10-26 15:39 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: gcc

Andreas,

I did a i686-linux-gnu-pc bootstrap last night from a ~18:00pm cvs checkout which went
through with no problems, including Ada.

So it might be something that went in after that.

I'll be updating again soon and do another bootstrap.

Graham

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-26 15:39 ` Graham Stott
@ 2002-10-27  3:48   ` Graham Stott
  2002-10-27  8:20     ` Graham Stott
  2002-10-27 23:39     ` Andreas Jaeger
  0 siblings, 2 replies; 8+ messages in thread
From: Graham Stott @ 2002-10-27  3:48 UTC (permalink / raw)
  To: Graham Stott; +Cc: Andreas Jaeger, gcc

Graham Stott wrote:
> Andreas,
> 
> I did a i686-linux-gnu-pc bootstrap last night from a ~18:00pm cvs 
> checkout which went
> through with no problems, including Ada.
> 
> So it might be something that went in after that.
> 
> I'll be updating again soon and do another bootstrap.
> 
> Graham
> 
> 

After today's update I get the same  bootstrap failure :-(

I suspect it's due to this patch

------------------------------------------------------------------
Sat Oct 26 01:44:46 CEST 2002  Jan Hubicka  <jh@suse.cz>

         * toplev.c (dump_file_index): Add DFI_ce3.
         (dump_file_info): Likewise.
         (rest_of_compilation): Run first ifcvt pass before tracer.
------------------------------------------------------------------

I'm going to revert it in my tree and see if the failure goes away.

Graham

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-27  3:48   ` Graham Stott
@ 2002-10-27  8:20     ` Graham Stott
  2002-10-27 17:23       ` Jan Hubicka
  2002-10-27 23:39     ` Andreas Jaeger
  1 sibling, 1 reply; 8+ messages in thread
From: Graham Stott @ 2002-10-27  8:20 UTC (permalink / raw)
  To: Graham Stott; +Cc: Andreas Jaeger, gcc, jh

Graham Stott wrote:
> Graham Stott wrote:
> 
>> Andreas,
>>
>> I did a i686-linux-gnu-pc bootstrap last night from a ~18:00pm cvs 
>> checkout which went
>> through with no problems, including Ada.
>>
>> So it might be something that went in after that.
>>
>> I'll be updating again soon and do another bootstrap.
>>
>> Graham
>>
>>
> 
> After today's update I get the same  bootstrap failure :-(
> 
> I suspect it's due to this patch
> 
> ------------------------------------------------------------------
> Sat Oct 26 01:44:46 CEST 2002  Jan Hubicka  <jh@suse.cz>
> 
>         * toplev.c (dump_file_index): Add DFI_ce3.
>         (dump_file_info): Likewise.
>         (rest_of_compilation): Run first ifcvt pass before tracer.
> ------------------------------------------------------------------
> 
> I'm going to revert it in my tree and see if the failure goes away.
> 
> Graham
> 
> 

Yep reverting Jan's patch gets me back to bootstrap land again.

Graham


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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-27  8:20     ` Graham Stott
@ 2002-10-27 17:23       ` Jan Hubicka
  2002-10-28  4:23         ` Andreas Jaeger
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Hubicka @ 2002-10-27 17:23 UTC (permalink / raw)
  To: Graham Stott; +Cc: Andreas Jaeger, gcc, jh

> Graham Stott wrote:
> >Graham Stott wrote:
> >
> >>Andreas,
> >>
> >>I did a i686-linux-gnu-pc bootstrap last night from a ~18:00pm cvs 
> >>checkout which went
> >>through with no problems, including Ada.
> >>
> >>So it might be something that went in after that.
> >>
> >>I'll be updating again soon and do another bootstrap.
> >>
> >>Graham
> >>
> >>
> >
> >After today's update I get the same  bootstrap failure :-(
> >
> >I suspect it's due to this patch
> >
> >------------------------------------------------------------------
> >Sat Oct 26 01:44:46 CEST 2002  Jan Hubicka  <jh@suse.cz>
> >
> >        * toplev.c (dump_file_index): Add DFI_ce3.
> >        (dump_file_info): Likewise.
> >        (rest_of_compilation): Run first ifcvt pass before tracer.
> >------------------------------------------------------------------
> >
> >I'm going to revert it in my tree and see if the failure goes away.
> >
> >Graham
> >
> >
> 
> Yep reverting Jan's patch gets me back to bootstrap land again.
Hi,
I've sent a patch, but I won't be able to do ADA bootstrap before monday
most probably.  If you can do, could you please check the attached one?
I am still bootstrapping it, but it has fixed the other failures my
patch has caused.

Hi,
the problem has been uncovered latent bug - we didn't run reg-scan pass in all
ocasions when cse2 has been disabled but used the info in final pass by
enabling alias analysis.  I am just testing the attached patch that makes the
ifcvt1 pass to finish with reg_scan data valid and all the subsequent passes to
update it as needed.

I've verified it to test the testcase, bootstrap in progress.  OK if it passes?
Sun Oct 27 00:20:08 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* toplev.c (rest_of_compilation): Reorganize way reg_scan is called
	before final pass.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.684
diff -c -3 -p -r1.684 toplev.c
*** toplev.c	25 Oct 2002 23:46:06 -0000	1.684
--- toplev.c	26 Oct 2002 22:19:53 -0000
*************** rest_of_compilation (decl)
*** 2987,3003 ****
        close_dump_file (DFI_bp, print_rtl_with_bb, insns);
        timevar_pop (TV_BRANCH_PROB);
      }
!   if (flag_if_conversion)
      {
-       timevar_push (TV_IFCVT);
-       if (rtl_dump_file)
- 	dump_flow_info (rtl_dump_file);
        open_dump_file (DFI_ce1, decl);
        cleanup_cfg (CLEANUP_EXPENSIVE);
        reg_scan (insns, max_reg_num (), 0);
!       if_convert (0);
        close_dump_file (DFI_ce1, print_rtl_with_bb, get_insns ());
-       timevar_pop (TV_IFCVT);
      }
    if (flag_tracer)
      {
--- 2987,3010 ----
        close_dump_file (DFI_bp, print_rtl_with_bb, insns);
        timevar_pop (TV_BRANCH_PROB);
      }
!   if (optimize >= 0)
      {
        open_dump_file (DFI_ce1, decl);
+       if (flag_if_conversion)
+ 	{
+ 	  timevar_push (TV_IFCVT);
+ 	  if (rtl_dump_file)
+ 	    dump_flow_info (rtl_dump_file);
+ 	  cleanup_cfg (CLEANUP_EXPENSIVE);
+ 	  reg_scan (insns, max_reg_num (), 0);
+ 	  if_convert (0);
+ 	  timevar_pop (TV_IFCVT);
+ 	}
+       timevar_push (TV_JUMP);
        cleanup_cfg (CLEANUP_EXPENSIVE);
        reg_scan (insns, max_reg_num (), 0);
!       timevar_pop (TV_JUMP);
        close_dump_file (DFI_ce1, print_rtl_with_bb, get_insns ());
      }
    if (flag_tracer)
      {
*************** rest_of_compilation (decl)
*** 3005,3051 ****
        open_dump_file (DFI_tracer, decl);
        if (rtl_dump_file)
  	dump_flow_info (rtl_dump_file);
-       cleanup_cfg (CLEANUP_EXPENSIVE);
        tracer ();
        cleanup_cfg (CLEANUP_EXPENSIVE);
        close_dump_file (DFI_tracer, print_rtl_with_bb, get_insns ());
        timevar_pop (TV_TRACER);
-       reg_scan (get_insns (), max_reg_num (), 0);
      }
  
!   if (optimize > 0)
      {
        timevar_push (TV_CSE2);
        open_dump_file (DFI_cse2, decl);
        if (rtl_dump_file)
  	dump_flow_info (rtl_dump_file);
  
!       if (flag_rerun_cse_after_loop)
  	{
  	  timevar_push (TV_JUMP);
! 	  reg_scan (insns, max_reg_num (), 0);
! 	  timevar_pop (TV_JUMP);
! 
  	  cleanup_cfg (CLEANUP_EXPENSIVE);
! 	  /* CFG is no longer maintained up-to-date.  */
! 	  reg_scan (insns, max_reg_num (), 0);
! 	  tem = cse_main (insns, max_reg_num (), 1, rtl_dump_file);
! 	  purge_all_dead_edges (0);
! 	  delete_trivially_dead_insns (insns, max_reg_num ());
! 
! 	  if (tem)
! 	    {
! 	      timevar_push (TV_JUMP);
! 	      rebuild_jump_labels (insns);
! 	      cleanup_cfg (CLEANUP_EXPENSIVE);
! 	      timevar_pop (TV_JUMP);
! 	    }
  	}
! 
        close_dump_file (DFI_cse2, print_rtl_with_bb, insns);
-       timevar_pop (TV_CSE2);
- 
        ggc_collect ();
      }
  
    cse_not_expected = 1;
--- 3012,3046 ----
        open_dump_file (DFI_tracer, decl);
        if (rtl_dump_file)
  	dump_flow_info (rtl_dump_file);
        tracer ();
        cleanup_cfg (CLEANUP_EXPENSIVE);
+       reg_scan (insns, max_reg_num (), 0);
        close_dump_file (DFI_tracer, print_rtl_with_bb, get_insns ());
        timevar_pop (TV_TRACER);
      }
  
!   if (flag_rerun_cse_after_loop)
      {
        timevar_push (TV_CSE2);
        open_dump_file (DFI_cse2, decl);
        if (rtl_dump_file)
  	dump_flow_info (rtl_dump_file);
+       /* CFG is no longer maintained up-to-date.  */
+       tem = cse_main (insns, max_reg_num (), 1, rtl_dump_file);
+       purge_all_dead_edges (0);
+       delete_trivially_dead_insns (insns, max_reg_num ());
  
!       if (tem)
  	{
  	  timevar_push (TV_JUMP);
! 	  rebuild_jump_labels (insns);
  	  cleanup_cfg (CLEANUP_EXPENSIVE);
! 	  timevar_pop (TV_JUMP);
  	}
!       reg_scan (insns, max_reg_num (), 0);
        close_dump_file (DFI_cse2, print_rtl_with_bb, insns);
        ggc_collect ();
+       timevar_pop (TV_CSE2);
      }
  
    cse_not_expected = 1;

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-27  3:48   ` Graham Stott
  2002-10-27  8:20     ` Graham Stott
@ 2002-10-27 23:39     ` Andreas Jaeger
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Jaeger @ 2002-10-27 23:39 UTC (permalink / raw)
  To: Graham Stott; +Cc: gcc, Jan Hubicka

Graham Stott <graham.stott@btinternet.com> writes:

> Graham Stott wrote:
>> Andreas,
>> I did a i686-linux-gnu-pc bootstrap last night from a ~18:00pm cvs
>> checkout which went
>> through with no problems, including Ada.
>> So it might be something that went in after that.
>> I'll be updating again soon and do another bootstrap.
>> Graham
>>
>
> After today's update I get the same  bootstrap failure :-(
>
> I suspect it's due to this patch
>
> ------------------------------------------------------------------
> Sat Oct 26 01:44:46 CEST 2002  Jan Hubicka  <jh@suse.cz>
>
>          * toplev.c (dump_file_index): Add DFI_ce3.
>          (dump_file_info): Likewise.
>          (rest_of_compilation): Run first ifcvt pass before tracer.
> ------------------------------------------------------------------
>
> I'm going to revert it in my tree and see if the failure goes away.

Yes, reverting this patch fixes the problem for me.  Honza, can you
look into fixing this, please?

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-27 17:23       ` Jan Hubicka
@ 2002-10-28  4:23         ` Andreas Jaeger
  2002-10-28  8:03           ` Jason R Thorpe
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Jaeger @ 2002-10-28  4:23 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Graham Stott, gcc

Jan Hubicka <jh@suse.cz> writes:

>> Graham Stott wrote:
[...]
>> Yep reverting Jan's patch gets me back to bootstrap land again.
> Hi,
> I've sent a patch, but I won't be able to do ADA bootstrap before monday
> most probably.  If you can do, could you please check the attached one?
> I am still bootstrapping it, but it has fixed the other failures my
> patch has caused.

I've applied your patch and bootstrapping is fine again, currently
libjava is building so I don't have test results yet,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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

* Re: Ada bootstrap fails on CVS mainline
  2002-10-28  4:23         ` Andreas Jaeger
@ 2002-10-28  8:03           ` Jason R Thorpe
  0 siblings, 0 replies; 8+ messages in thread
From: Jason R Thorpe @ 2002-10-28  8:03 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: Jan Hubicka, Graham Stott, gcc

On Sun, Oct 27, 2002 at 09:50:02AM +0100, Andreas Jaeger wrote:

 > I've applied your patch and bootstrapping is fine again, currently
 > libjava is building so I don't have test results yet,

Jan's patch fixes things for me, as well.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

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

end of thread, other threads:[~2002-10-28  5:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-26 12:31 Ada bootstrap fails on CVS mainline Andreas Jaeger
2002-10-26 15:39 ` Graham Stott
2002-10-27  3:48   ` Graham Stott
2002-10-27  8:20     ` Graham Stott
2002-10-27 17:23       ` Jan Hubicka
2002-10-28  4:23         ` Andreas Jaeger
2002-10-28  8:03           ` Jason R Thorpe
2002-10-27 23:39     ` Andreas Jaeger

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