mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 23:51:18 +08:00
re PR fortran/80142 (Warning: No location in expression ... with -O / -ffrontend-optimize)
2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/80142 * frontend-passes.c (combine_array_constructor): Take location of new expression from constructor expression instead of constructor. 2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/80142 * gfortran.dg/any_loc.f90: New test case. From-SVN: r246388
This commit is contained in:
parent
b1fb3cb042
commit
918b6c9ec2
@ -1,3 +1,10 @@
|
||||
2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/80142
|
||||
* frontend-passes.c (combine_array_constructor): Take
|
||||
location of new expression from constructor expression instead
|
||||
of constructor.
|
||||
|
||||
2017-03-18 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/79676
|
||||
|
@ -1381,7 +1381,7 @@ combine_array_constructor (gfc_expr *e)
|
||||
new_expr->ts = e->ts;
|
||||
new_expr->expr_type = EXPR_OP;
|
||||
new_expr->rank = c->expr->rank;
|
||||
new_expr->where = c->where;
|
||||
new_expr->where = c->expr->where;
|
||||
new_expr->value.op.op = e->value.op.op;
|
||||
|
||||
if (scalar_first)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2017-03-22 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/80142
|
||||
* gfortran.dg/any_loc.f90: New test case.
|
||||
|
||||
2017-03-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
PR target/80082
|
||||
|
27
gcc/testsuite/gfortran.dg/any_loc.f90
Normal file
27
gcc/testsuite/gfortran.dg/any_loc.f90
Normal file
@ -0,0 +1,27 @@
|
||||
! { dg-do compile }
|
||||
! { dg-options "-ffrontend-optimize" }
|
||||
! PR fortran/80142 - the location on the expression of the
|
||||
! unrolled any statement was not correctly set.
|
||||
! Test case by Harald Anlauf.
|
||||
MODULE gfcbug140
|
||||
implicit none
|
||||
integer ,parameter :: WV_NONE = 1
|
||||
integer, parameter :: WV_CDV_4 = 23
|
||||
integer, parameter :: WV_CDV_8 = 24
|
||||
integer, parameter :: wv_CDV_list(2) = [ WV_CDV_4, WV_CDV_8 ]
|
||||
integer :: basis = WV_NONE
|
||||
contains
|
||||
subroutine wave_1d (x)
|
||||
real, intent(inout) :: x(:,:)
|
||||
integer :: oldbase
|
||||
oldbase = basis
|
||||
if (any (basis == wv_CDV_list(:))) then
|
||||
end if
|
||||
basis = oldbase
|
||||
end subroutine wave_1d
|
||||
!-
|
||||
subroutine mr_gp_mat (A)
|
||||
real, intent(inout) :: A (:,:)
|
||||
call wave_1d (A)
|
||||
end subroutine mr_gp_mat
|
||||
end module gfcbug140
|
Loading…
x
Reference in New Issue
Block a user