Always use locations from get and put arguments for error messages.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 14 Jun 2020 12:39:03 +0000 (14:39 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 14 Jun 2020 12:39:03 +0000 (14:39 +0200)
commit4644e8f15f835a9934a8d289ee08ba4cb46cbfac
treeac243c4241bfe472b78db70a0b52acd0487a5daa
parent1af22e455584ef5fcad2b4474c1efc3fd26f6cb3
Always use locations from get and put arguments for error messages.

A simple and obvios patch - the error location was taken
from a variable that was not initialized for optional
variables.

gcc/fortran/ChangeLog:

* check.c (gfc_check_random_seed): Always use locations
from get and put arguments for error messages.

gcc/testsuite/ChangeLog:

* gfortran.dg/random_seed_4.f90: New test.
gcc/fortran/check.c
gcc/testsuite/gfortran.dg/random_seed_4.f90 [new file with mode: 0644]