Discussion:
[Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified
Paul Richard Thomas
2018-06-27 13:48:31 UTC
Permalink
I posted a patch for this on the PR in August 2010. Dominique pointed
out that it caused repeated error messages in some testcases; eg.
arithmetic_overflow_1.f90

As it happens, that seems to have crept in at some time even without
the patch for this PR. Nevertheless, I have modified the patch
slightly to prevent any more escalation. Apart from this, the patch is
very straightforward.

Bootstraps and regtests on FC28/x86_64 - OK for trunk and....?

Paul

2018-06-27 Paul Thomas <***@gcc.gnu.org>

PR fortran/45305
* expr.c : Add a prototype for scalarize_intrinsic_call.
(gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
intrinsic function calls.
(scalarize_intrinsic_call): Add 'init_flag' argument. Check if
the expression or any of the actual argument expressions are
NULL. Before calling gfc_check_init_expr, check 'init_flag'.
Only simplify the scalarized expressions if there are no errors
on the stack.
(gfc_check_init_expr): Set 'init_flag' true in the call to
scalarize_intrinsic_call.

2018-06-27 Paul Thomas <***@gcc.gnu.org>

PR fortran/45305
* gfortran.dg/scalarize_parameter_array_3.f90: New test.
Jerry DeLisle
2018-06-30 14:37:18 UTC
Permalink
Post by Paul Richard Thomas
I posted a patch for this on the PR in August 2010. Dominique pointed
out that it caused repeated error messages in some testcases; eg.
arithmetic_overflow_1.f90
As it happens, that seems to have crept in at some time even without
the patch for this PR. Nevertheless, I have modified the patch
slightly to prevent any more escalation. Apart from this, the patch is
very straightforward.
Bootstraps and regtests on FC28/x86_64 - OK for trunk and....?
Paul
Well this goes way back. OK for trunk. If you want to backport to 7 and
8, your choice.

Jerry
Paul Richard Thomas
2018-06-30 15:16:26 UTC
Permalink
Ok, thanks.

I think that I will stick to trunk, since we do not seem to have been
overwhelmed with demand to fix this!

Regards

Paul
Post by Jerry DeLisle
Post by Paul Richard Thomas
I posted a patch for this on the PR in August 2010. Dominique pointed
out that it caused repeated error messages in some testcases; eg.
arithmetic_overflow_1.f90
As it happens, that seems to have crept in at some time even without
the patch for this PR. Nevertheless, I have modified the patch
slightly to prevent any more escalation. Apart from this, the patch is
very straightforward.
Bootstraps and regtests on FC28/x86_64 - OK for trunk and....?
Paul
Well this goes way back. OK for trunk. If you want to backport to 7 and
8, your choice.
Jerry
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein
Loading...