[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||build, ice-on-valid-code,
   ||memory-hog
Summary|bootstrap failure on Alpha: |[4.2 regression] bootstrap
   |xgcc runs out of memory |failure on Alpha: xgcc runs
   |compiling libiberty/md5.c   |out of memory compiling
   ||libiberty/md5.c
   Target Milestone|--- |4.2.0


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-19 15:38 ---
I wonder if this is related to at all PR 26348.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||26348


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread falk at debian dot org


--- Comment #3 from falk at debian dot org  2006-02-19 15:57 ---
(In reply to comment #2)
 I wonder if this is related to at all PR 26348.

Probably not, because it already happens without any options (forgot to mention
that).


-- 

falk at debian dot org changed:

   What|Removed |Added

   Target Milestone|4.2.0   |---


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-19 16:30 ---
[11:22]  mellum The Alpha bootstrap bug seems to be due to
alpha_expand_prologue being miscompiled
[11:23]  mellum there's a loop
[11:24]  mellum for (probed = 4096; probed  frame_size; probed += 8192) {
[11:24]  mellum fprintf(stderr, probed = %d, frame_size = %ld\n, probed,
frame_size);
[11:24]  mellum and this gives
[11:24]  mellum probed = 4096, frame_size = 4112
[11:24]  mellum probed = 12288, frame_size = 4112
[11:24]  mellum probed = 20480, frame_size = 4112
[11:24]  mellum etc so the loop exit isn't taken
[11:24]  mellum does this look like a known problem?

From that description, this looks like PR 25985.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn|26348   |25985
   Target Milestone|--- |4.2.0


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread falk at debian dot org


--- Comment #5 from falk at debian dot org  2006-02-19 18:19 ---
The problem apparently comes from using negation on an induction variable,
in a context where widening is needed:

[EMAIL PROTECTED]:/tmp% cat alpha.c
void abort(void);
int printf(const char *format, ...);

__attribute__((noinline))
void gen_rtx_CONST_INT(long x) {
if (-x  10)
abort();
}

__attribute__((noinline))
int alpha_expand_prologue(long frame_size)
{
int probed;
for (probed = 1; probed  frame_size; probed += 2) {
printf(probed = %d, frame_size = %ld\n,
   probed, frame_size);
gen_rtx_CONST_INT (-probed);
}
}

int main(void) {
alpha_expand_prologue(10);
return 0;
}


[EMAIL PROTECTED]:/tmp% /src/gcc-2006.02.19/build/prev-gcc/xgcc
-B/src/gcc-2006.02.19/build/prev-gcc/ -g -O2 alpha.c  ./a.out 
probed = 1, frame_size = 10
probed = 3, frame_size = 10
probed = 5, frame_size = 10
probed = 7, frame_size = 10
probed = 9, frame_size = 10
probed = 11, frame_size = 10
zsh: abort (core dumped)  ./a.out


[EMAIL PROTECTED]:/tmp% /src/gcc-2006.02.19/build/prev-gcc/xgcc
-B/src/gcc-2006.02.19/build/prev-gcc/ -g -O2 -fno-ivopts alpha.c  ./a.out 
probed = 1, frame_size = 10
probed = 3, frame_size = 10
probed = 5, frame_size = 10
probed = 7, frame_size = 10
probed = 9, frame_size = 10


-- 


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread steven at gcc dot gnu dot org


--- Comment #6 from steven at gcc dot gnu dot org  2006-02-19 18:56 ---
Also fails on AMD64.


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-02-19 18:56:19
   date||


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread falk at debian dot org


--- Comment #7 from falk at debian dot org  2006-02-19 18:58 ---
not really ice-on-valid-code nor memory-hog, those were only due to miscompiled
xgcc


-- 

falk at debian dot org changed:

   What|Removed |Added

   Keywords|ice-on-valid-code, memory-  |
   |hog |


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2006-02-19 19:36 ---
This looks more related to PR 26304.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||26304


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread falk at debian dot org


--- Comment #9 from falk at debian dot org  2006-02-19 22:46 ---
This bug was introduced with:

r75 | law | 2006-02-17 05:15:32 +0100 (Fri, 17 Feb 2006) | 33 lines

* tree-vrp.c (set_value_range_to_nonnegative): New function.
(vrp_expr_computes_nonnegative, ssa_name_nonnegative_p): Likewise.
(ssa_name_nonzero_p): Likewise.
(get_value_range): Return NULL if VRP is not running.
(extract_range_from_expr): Fallback to tree_expr_XXX_p if
VRP routines do not discover a range.
(vrp_finalize): Clear VR_VALUE to indicate VRP is not running.
* tree.h (ssa_name_nonzero_p, ssa_name_nonnegative_p): Prototype.
* fold-const.c (tree_expr_nonzero_p): For SSA_NAMEs, query VRP.
(tree_expr_nonnegative_p): Similarly.
* tree-ssa-dom.c (nonzero_vars, nonzero_vars_stack): Remove.
(restore_nonzero_vars_to_original_value): Remove.
(unsafe_associative_fp_binop): Remove.
(tree_ssa_dominator_optimize): Remove initialization and
finalization of nonzero_vars and nonzero_vars_stack.
(dom_opt_initialize_block): No longer push marker on
nonzero_vars_stack.
(dom_opt_finalize_block): No longer call
restore_nonzero_vars_to_original_value.
(record_equivalences_from_phis): No longer look for
nonzero PHI arguments.
(cprop_into_successor_phis): No longer propagate nonzero
property into PHI arguments.  Lose unused argument.  Caller
updated.
(record_equivalences_from_stmt): No longer record nonzero
values for SSA_NAMEs.
(lookup_avail_expr): No longer use nonzero_vars.

* gcc.dg/tree-ssa/vrp24.c: Update expected output.
* gcc.dg/tree-ssa/vrp26.c: New test.


-- 

falk at debian dot org changed:

   What|Removed |Added

 CC||law at gcc dot gnu dot org


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread roger at eyesopen dot com


--- Comment #10 from roger at eyesopen dot com  2006-02-20 03:11 ---
Analyzing the code in comment #5, this looks like a bad interaction between
ivopts and vrp.  Either of -fno-ivopts or -fno-tree-vrp cures the problem.
But it looks like the output of .084t.ivopts is reasonable.


-- 

roger at eyesopen dot com changed:

   What|Removed |Added

 CC||roger at eyesopen dot com


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread roger at eyesopen dot com


--- Comment #11 from roger at eyesopen dot com  2006-02-20 03:52 ---
Hmmm.  Looks like the problem is in .088t.vrp2

We have
unsigned int D.1981;
unsigned int D.1982;
D.1982_9 = -D.1981_1;

D.1981_1: [0, +INF]  EQUIVALENCES: { } (0 elements)
D.1982_9: [0, 1]  EQUIVALENCES: { } (0 elements)

Seems like a bug in the interval arithmetic of NEGATE_EXPR for unsigned types.
- [0, (unsigned)-1] seems to be converted to [0, 1]!!?  I hope this helps.


-- 


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



[Bug bootstrap/26361] [4.2 regression] bootstrap failure on Alpha: xgcc runs out of memory compiling libiberty/md5.c

2006-02-19 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2006-02-20 04:58 
---
Here is a testcase independent of IV-OPTs:
void abort(void);
int printf(const char *format, ...);

__attribute__((noinline))
void gen_rtx_CONST_INT(long long x) {
if (-x  10)
abort();
}
__attribute__((noinline))
int alpha_expand_prologue(long frame_size)
{
unsigned long long a;
int probed;
if (frame_size = 1)  return;
unsigned long long b = -2;
a = -2;
do {
int a1 = a;
probed = -a1;
printf(probed = %d, frame_size = %ld\n,
   probed, frame_size);
gen_rtx_CONST_INT (a1);
a -= 2;
a1 = -a;
probed = a1;
} while (probed  frame_size);
}

int main(void) {
alpha_expand_prologue(10);
return 0;
}

-

I tried this on 4.1.0 and could not reproduce it there, though my 4.1.0 is from
20060208.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
  BugsThisDependsOn|25985, 26304|


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