Commit 5b0c69ae by Richard Biener Committed by Richard Biener

re PR middle-end/81889 (bogus warnings with -Wmaybe-uninitialized -O3)

2017-12-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81889
	* tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
	range info from the non-wrapping IV instead of just the range
	of the type.

	* gfortran.dg/pr81889.f90: New testcase.
	* gcc.dg/tree-ssa/pr64183.c: Adjust.

From-SVN: r255573
parent e157d456
2017-12-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/81889
* tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
range info from the non-wrapping IV instead of just the range
of the type.
2017-12-12 Julia Koval <julia.koval@intel.com> 2017-12-12 Julia Koval <julia.koval@intel.com>
* config.gcc: Add vaesintrin.h. * config.gcc: Add vaesintrin.h.
2017-12-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/81889
* gfortran.dg/pr81889.f90: New testcase.
* gcc.dg/tree-ssa/pr64183.c: Adjust.
2017-12-12 Julia Koval <julia.koval@intel.com> 2017-12-12 Julia Koval <julia.koval@intel.com>
* gcc.target/i386/avx512-check.h: Handle bit_VAES. * gcc.target/i386/avx512-check.h: Handle bit_VAES.
......
...@@ -17,4 +17,4 @@ test () ...@@ -17,4 +17,4 @@ test ()
bits += 8; bits += 8;
} }
/* { dg-final { scan-tree-dump "Loop 2 iterates at most 4 times" "cunroll"} } */ /* { dg-final { scan-tree-dump "Loop 2 iterates at most 3 times" "cunroll"} } */
! { dg-do compile }
! { dg-options "-O3 -Wall" }
module m
type t
integer, dimension(:), pointer :: list
end type
contains
subroutine s(n, p, Y)
integer, intent(in) :: n
type(t) :: p
real, dimension(:) :: Y
real, dimension(1:16) :: xx
if (n > 3) then
xx(1:n) = 0.
print *, xx(1:n)
else
xx(1:n) = Y(p%list(1:n)) ! { dg-bogus "uninitialized" }
print *, sum(xx(1:n))
end if
end subroutine
end module
...@@ -3510,6 +3510,12 @@ infer_loop_bounds_from_signedness (struct loop *loop, gimple *stmt) ...@@ -3510,6 +3510,12 @@ infer_loop_bounds_from_signedness (struct loop *loop, gimple *stmt)
low = lower_bound_in_type (type, type); low = lower_bound_in_type (type, type);
high = upper_bound_in_type (type, type); high = upper_bound_in_type (type, type);
wide_int minv, maxv;
if (get_range_info (def, &minv, &maxv) == VR_RANGE)
{
low = wide_int_to_tree (type, minv);
high = wide_int_to_tree (type, maxv);
}
record_nonwrapping_iv (loop, base, step, stmt, low, high, false, true); record_nonwrapping_iv (loop, base, step, stmt, low, high, false, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment