re PR sanitizer/69055 (Internal compiler error -fsanitize=float-cast-overflow)

PR sanitizer/69055
	* ubsan.c (ubsan_instrument_float_cast): Call
	initialize_sanitizer_builtins.

	* gfortran.dg/pr69055.f90: New test.

From-SVN: r232024
This commit is contained in:
Jakub Jelinek 2016-01-01 12:55:02 +01:00 committed by Jakub Jelinek
parent 3c5fc1380c
commit 10dff63f98
4 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2016-01-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/69055
* ubsan.c (ubsan_instrument_float_cast): Call
initialize_sanitizer_builtins.
PR target/69015
* ifcvt.c (find_cond_trap): Give up if returnjump_p (jump).

View File

@ -1,5 +1,8 @@
2016-01-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/69055
* gfortran.dg/pr69055.f90: New test.
PR target/69015
* gcc.dg/pr69015.c: New test.

View File

@ -0,0 +1,10 @@
! { dg-do compile }
! { dg-options "-fsanitize=float-cast-overflow" }
subroutine pr69055
implicit none
integer :: n
real(8) :: b
b = huge(1.0D0)
n = b
end subroutine pr69055

View File

@ -1588,6 +1588,7 @@ ubsan_instrument_float_cast (location_t loc, tree type, tree expr, tree arg)
{
location_t *loc_ptr = NULL;
unsigned num_locations = 0;
initialize_sanitizer_builtins ();
/* Figure out if we can propagate location to ubsan_data and use new
style handlers in libubsan. */
if (ubsan_use_new_style_p (loc))