On 5/4/20 10:14 PM, Harald Anlauf wrote:
The attached patch fixes a couple of cases where an invalid NULL() argument
provided to intrinsics produced either an ICE or was silently accepted.
We now reject them.
Steve Kargl provided an initial version, which I extended to catch a few
more cases.
Regtests with no new failures on x86_64-pc-linux-gnu. OK for master?
Two points regarding future patches:
Please attach files with a file suffix – such that the MIME
type is "text/..." and not "application/octet-stream".
(.patch, .diff or even a simple .txt should do.)
Additionally, given that we now use GIT and start to move
to autogenerating changelogs, can you post the commit-log
text instead of (only) the changelog entry?
See: https://gcc.gnu.org/pipermail/gcc/2020-April/thread.html#500
("Automatically generated ChangeLog files")
and follow-up in May
https://gcc.gnu.org/pipermail/gcc/2020-April/000500.html
Regarding the patch:
+ gfc_error ("NULL pointer at %L is not permitted as actual argument "
+ "of %qs intrinsic function", &x->where,
I wonder whether "argument of" should be rather "argument to" and
"NULL pointer" should be "NULL" as Fortran only talks about
"disassociated" pointers etc. and not about NULL pointers.
(I know that this is unchanged from the original code.)
Otherwise it LGTM.
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander
Walter