public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified
       [not found] <CAGkQGiL0eF56n+YWwrkyk0ujXaSe+3u0gHSEMUvunhSRP-BsYw@mail.gmail.com>
@ 2018-06-27 13:48 ` Paul Richard Thomas
  2018-06-30 14:42   ` Jerry DeLisle
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Richard Thomas @ 2018-06-27 13:48 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]

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  <pault@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  <pault@gcc.gnu.org>

    PR fortran/45305
    * gfortran.dg/scalarize_parameter_array_3.f90: New test.

[-- Attachment #2: Change.Logs --]
[-- Type: application/octet-stream, Size: 693 bytes --]

2018-06-27  Paul Thomas  <pault@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  <pault@gcc.gnu.org>

	PR fortran/45305
	* gfortran.dg/scalarize_parameter_array_3.f90: New test.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified
  2018-06-27 13:48 ` [Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified Paul Richard Thomas
@ 2018-06-30 14:42   ` Jerry DeLisle
  2018-06-30 15:32     ` Paul Richard Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Jerry DeLisle @ 2018-06-30 14:42 UTC (permalink / raw)
  To: Paul Richard Thomas, fortran, gcc-patches

On 06/27/2018 06:48 AM, Paul Richard Thomas wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified
  2018-06-30 14:42   ` Jerry DeLisle
@ 2018-06-30 15:32     ` Paul Richard Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Richard Thomas @ 2018-06-30 15:32 UTC (permalink / raw)
  To: jerry DeLisle; +Cc: fortran, gcc-patches

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
On Sat, 30 Jun 2018 at 15:37, Jerry DeLisle <jvdelisle@charter.net> wrote:
>
> On 06/27/2018 06:48 AM, Paul Richard Thomas wrote:
> > 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-30 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAGkQGiL0eF56n+YWwrkyk0ujXaSe+3u0gHSEMUvunhSRP-BsYw@mail.gmail.com>
2018-06-27 13:48 ` [Patch, fortran] PR45305 - Array-valued calls to elementals are not simplified Paul Richard Thomas
2018-06-30 14:42   ` Jerry DeLisle
2018-06-30 15:32     ` Paul Richard Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).