public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-02-19 17:08 Andrew Haley
  2006-02-19 17:11 ` Andrew Pinski
  2006-02-19 17:20 ` Andreas Schwab
  0 siblings, 2 replies; 50+ messages in thread
From: Andrew Haley @ 2006-02-19 17:08 UTC (permalink / raw)
  To: gcc

When building a-textio in libada, today's gcc build fails when memory
is exhausted.

Seems like VRP is looping, consuming more and more memory.

Andrew.



make[7]: `a-teioed.o' is up to date.
/home/aph/gcc/build-x86_64-unknown-linux-gnu/./gcc/xgcc -B/home/aph/gcc/build-x86_64-unknown-linux-gnu/./gcc/ -B/home/aph/gcc/install/x86_64-unknown-linux-gnu/bin/ -B/home/aph/gcc/install/x86_64-unknown-linux-gnu/lib/ -isystem /home/aph/gcc/install/x86_64-unknown-linux-gnu/include -isystem /home/aph/gcc/install/x86_64-unknown-linux-gnu/sys-include -c -g -O2 -fPIC      -W -Wall -gnatpg  a-textio.adb -o a-textio.o
virtual memory exhausted: Cannot allocate memory
make[7]: *** [a-textio.o] Error 1
make[7]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/gcc/ada/rts'
make[6]: *** [gnatlib] Error 2
make[6]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/gcc/ada'
make[5]: *** [gnatlib-shared-default] Error 2
make[5]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/gcc/ada'
make[4]: *** [gnatlib-shared-dual] Error 2
make[4]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/gcc/ada'
make[3]: *** [gnatlib-shared] Error 2
make[3]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/gcc/ada'
make[2]: *** [gnatlib-shared] Error 2
make[2]: Leaving directory `/homes/home/aph/gcc/build-x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/libada'
make[1]: *** [all-target-libada] Error 2


Program received signal SIGINT, Interrupt.
0x00000000009260c9 in tree_int_cst_compare (t1=0x2b05a43cfe70, t2=0x2b05a55296c0)
    at /home/aph/gcc/trunk/gcc/tree.c:4390
(gdb) bt
#0  0x00000000009260c9 in tree_int_cst_compare (t1=0x2b05a43cfe70, t2=0x2b05a55296c0)
    at /home/aph/gcc/trunk/gcc/tree.c:4390
#1  0x000000000095ce9d in extract_range_from_expr (vr=0x7fffffd07e80, expr=0x2b05a540c9b0)
    at /home/aph/gcc/trunk/gcc/tree-vrp.c:614
#2  0x000000000095d752 in vrp_visit_assignment (stmt=0x2b05a540ca00, output_p=0x7fffffd07ef0)
    at /home/aph/gcc/trunk/gcc/tree-vrp.c:3366
#3  0x00000000006a2bf1 in simulate_stmt (stmt=0x2b05a540ca00)
    at /home/aph/gcc/trunk/gcc/tree-ssa-propagate.c:306
#4  0x00000000006a2e0f in process_ssa_edge_worklist (worklist=0x12417e8)
    at /home/aph/gcc/trunk/gcc/tree-ssa-propagate.c:380
#5  0x00000000006a3243 in ssa_propagate (visit_stmt=Variable "visit_stmt" is not available.
) at /home/aph/gcc/trunk/gcc/tree-ssa-propagate.c:683
#6  0x000000000095f2bf in execute_vrp () at /home/aph/gcc/trunk/gcc/tree-vrp.c:4569
#7  0x000000000094fd86 in execute_one_pass (pass=0x12f3550) at /home/aph/gcc/trunk/gcc/passes.c:854
#8  0x000000000094feec in execute_pass_list (pass=0x12f3550) at /home/aph/gcc/trunk/gcc/passes.c:898
#9  0x000000000094fefe in execute_pass_list (pass=0xdd6380) at /home/aph/gcc/trunk/gcc/passes.c:899
#10 0x000000000065853a in tree_rest_of_compilation (fndecl=0x2b05a5359500)
    at /home/aph/gcc/trunk/gcc/tree-optimize.c:412
#11 0x000000000041b715 in gnat_expand_body (gnu_decl=0x2b05a5359500) at /home/aph/gcc/trunk/gcc/ada/misc.c:653
#12 0x00000000009a3966 in cgraph_expand_function (node=0x2b05a539f6c0)
    at /home/aph/gcc/trunk/gcc/cgraphunit.c:1101
#13 0x00000000009a5f38 in cgraph_optimize () at /home/aph/gcc/trunk/gcc/cgraphunit.c:1166
#14 0x000000000041bf8a in gnat_parse_file (set_yydebug=Variable "set_yydebug" is not available.
) at /home/aph/gcc/trunk/gcc/ada/misc.c:245
#15 0x0000000000921378 in toplev_main (argc=Variable "argc" is not available.
) at /home/aph/gcc/trunk/gcc/toplev.c:999
#16 0x0000003d4071d024 in __libc_start_main () from /lib64/libc.so.6
#17 0x00000000004030b9 in _start ()
#18 0x00007fffffd081f8 in ?? ()
#19 0x0000000000000000 in ?? ()
(gdb) 

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-02-19 19:17 Richard Kenner
  0 siblings, 0 replies; 50+ messages in thread
From: Richard Kenner @ 2006-02-19 19:17 UTC (permalink / raw)
  To: ebotcazou; +Cc: gcc

    "Second, for a given integer type (such as
    natural___XDLU_0_2147483647), the type for the nodes in TYPE_MIN_VALUE
    and TYPE_MAX_VALUE really should be a natural___XDLU_0_2147483647.
    ie, the type of an integer constant should be the same as the type of
    its min/max values."

No, the type of the bounds of a subtype should be the *base type*.  That's
how the tree has always looked, as far back as  I can remember.

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-01  2:00 Richard Kenner
  0 siblings, 0 replies; 50+ messages in thread
From: Richard Kenner @ 2006-03-01  2:00 UTC (permalink / raw)
  To: law; +Cc: gcc

    Basically with the way Ada's setting of TYPE_MIN_VALUE/TYPE_MAX_VALUE
    effectively makes them useless as we can not rely on them to 
    actually reflect the set of values allowed in an object.

As we've all told you numerous times before, TYPE_MIN_VALUE/TYPE_MAX_VALUE
are meant *precisely* to refect the set of valid values in an object.
("valid" is a technical term in Ada, while "allowed" is vague, so I'm
using the former term).

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-01  2:02 Richard Kenner
  0 siblings, 0 replies; 50+ messages in thread
From: Richard Kenner @ 2006-03-01  2:02 UTC (permalink / raw)
  To: dnovillo; +Cc: gcc

    Which doesn't mean that Ada is DTRT.  On the contrary, Ada ought to be
    fixed.  It's an ugly hack in extract_range_from_assert:

It wasn't a bug in the Ada front end, but in fold, which was long-ago
fixed.  I thought this was removed a long time ago?

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-01  3:01 Richard Kenner
  2006-03-03  8:08 ` Duncan Sands
  0 siblings, 1 reply; 50+ messages in thread
From: Richard Kenner @ 2006-03-01  3:01 UTC (permalink / raw)
  To: law; +Cc: dewar, gcc

    We have a loop with the following termination code in uintp.num_bits

This sure looks like a bug in Num_Bits to me, not in the compilation
of the front-end.

The relevant code is:

   function Num_Bits (Input : Uint) return Nat is
      Bits : Nat;
      Num  : Nat;

   begin
      if UI_Is_In_Int_Range (Input) then
         Num := abs (UI_To_Int (Input));
         Bits := 0;

This code only works for one-complement machines, since it assumes a
symmetric range for Int.  It breaks when UI_To_Int returns Integer'First, as
it did in this case.  When it does, the abs produces an erroneous result
(since checking is disabled).  So it almost doesn't matter what it puts into
Num (but it actually puts in an out-of-range value there too).

Robert, what's the proper fix here?

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-01 13:10 Richard Kenner
  0 siblings, 0 replies; 50+ messages in thread
From: Richard Kenner @ 2006-03-01 13:10 UTC (permalink / raw)
  To: laurent; +Cc: dewar, gcc

    So this is likely to be a FE Ada coding bug and not a FE/ME/BE interface
    issue, thanks for spotting this!

Indeed, having looked a bit closer at Uintp, I think this is the right fix.
Robert, please confirm.

*** uintp.adb	12 Sep 2003 21:50:56 -0000	1.80
--- uintp.adb	1 Mar 2006 13:08:06 -0000
*************** package body Uintp is
*** 591,595 ****
  
     begin
!       if UI_Is_In_Int_Range (Input) then
           Num := abs (UI_To_Int (Input));
           Bits := 0;
--- 591,598 ----
  
     begin
!       if Input = Uint_Int_First then
!          Num := Int'Size;
! 
!       elsif UI_Is_In_Int_Range (Input) then
           Num := abs (UI_To_Int (Input));
           Bits := 0;


^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-01 13:17 Richard Kenner
  2006-03-01 21:16 ` Jeffrey A Law
  0 siblings, 1 reply; 50+ messages in thread
From: Richard Kenner @ 2006-03-01 13:17 UTC (permalink / raw)
  To: laurent; +Cc: dewar, gcc

    So this is likely to be a FE Ada coding bug and not a FE/ME/BE interface
    issue, thanks for spotting this!

Sorry, my last suggestion is clearly wrong.  I think is right.

*** uintp.adb	12 Sep 2003 21:50:56 -0000	1.80
--- uintp.adb	1 Mar 2006 13:16:21 -0000
*************** package body Uintp is
*** 591,595 ****
  
     begin
!       if UI_Is_In_Int_Range (Input) then
           Num := abs (UI_To_Int (Input));
           Bits := 0;
--- 591,598 ----
  
     begin
!       if Input = Uint_Int_First then
!          return Int'Size;
! 
!       elsif UI_Is_In_Int_Range (Input) then
           Num := abs (UI_To_Int (Input));
           Bits := 0;

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: Bootstrap failure on trunk: x86_64-linux-gnu
@ 2006-03-02 19:09 Richard Kenner
  0 siblings, 0 replies; 50+ messages in thread
From: Richard Kenner @ 2006-03-02 19:09 UTC (permalink / raw)
  To: law; +Cc: gcc

    Just to be 100% clear, I'm leaving this one in the hands of the
    Ada maintainers.  I'm not qualified to fix it.  

Right.

    We're also still need the uintp fix installed.  I'm not qualified to
    say if Kenner's fix is correct or not, thus I'm not comfortable
    checking in that change.

Robert was out of the country for the last few days.  I expect him to get
back to me on it today.

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

end of thread, other threads:[~2007-12-05 21:20 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-19 17:08 Bootstrap failure on trunk: x86_64-linux-gnu Andrew Haley
2006-02-19 17:11 ` Andrew Pinski
2006-02-19 17:14   ` Arnaud Charlet
2006-02-19 19:13     ` Eric Botcazou
2006-02-21 17:35       ` Jeffrey A Law
2006-02-21 22:56         ` Mark Mitchell
2006-02-22 10:51           ` Richard Guenther
2006-02-22 16:31             ` Jeffrey A Law
2006-02-22 16:40           ` Jeffrey A Law
2006-02-22 17:00             ` Mark Mitchell
2006-02-22 17:07               ` Jeffrey A Law
2006-02-23 21:25                 ` Richard Henderson
2006-02-28 11:04         ` Eric Botcazou
2006-02-28 16:48           ` Jeffrey A Law
2006-02-28 17:40             ` Eric Botcazou
2006-02-28 22:43               ` Jeffrey A Law
2006-02-28 23:59                 ` Daniel Jacobowitz
2006-03-01 12:08                   ` Laurent GUERBY
2006-03-01 22:35                     ` Jeffrey A Law
2006-03-01 23:38                       ` ACATS c460008 and VRP (was: Bootstrap failure on trunk: x86_64-linux-gnu) Laurent GUERBY
2006-03-01 23:58                         ` ACATS c460008 and VRP Robert Dewar
2006-03-02  0:34                         ` ACATS c460008 and VRP (was: Bootstrap failure on trunk: x86_64-linux-gnu) Eric Botcazou
2006-03-02  0:43                           ` ACATS c460008 and VRP Robert Dewar
2006-03-02 13:02                             ` Eric Botcazou
2006-03-02 20:00                               ` Laurent GUERBY
2006-03-02 20:03                                 ` Eric Botcazou
2006-03-02  8:32                         ` ACATS c460008 and VRP (was: Bootstrap failure on trunk: x86_64-linux-gnu) Laurent GUERBY
2007-12-05 21:20                         ` Richard Kenner
2006-03-02 13:03                       ` Bootstrap failure on trunk: x86_64-linux-gnu Eric Botcazou
2006-03-02 13:29                         ` Eric Botcazou
2006-03-02 19:07                         ` Jeffrey A Law
2006-03-02 19:12                           ` Eric Botcazou
2006-03-01 10:29                 ` Sebastian Pop
2006-02-28 16:57           ` Diego Novillo
2006-02-28 17:12             ` Richard Guenther
2006-02-28 17:48             ` Eric Botcazou
2006-02-28 22:43               ` Jeffrey A Law
2006-02-28 22:51                 ` Diego Novillo
2006-02-28 23:21                   ` Jeffrey A Law
2006-02-19 17:35   ` Andrew Haley
2006-02-19 17:20 ` Andreas Schwab
2006-02-19 19:17 Richard Kenner
2006-03-01  2:00 Richard Kenner
2006-03-01  2:02 Richard Kenner
2006-03-01  3:01 Richard Kenner
2006-03-03  8:08 ` Duncan Sands
2006-03-01 13:10 Richard Kenner
2006-03-01 13:17 Richard Kenner
2006-03-01 21:16 ` Jeffrey A Law
2006-03-02 19:09 Richard Kenner

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