[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-08-18 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Jerry DeLisle  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from Jerry DeLisle  ---
Fixed on 7.3, closing

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-08-18 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #15 from Jerry DeLisle  ---
Author: jvdelisle
Date: Fri Aug 18 21:36:50 2017
New Revision: 251189

URL: https://gcc.gnu.org/viewcvs?rev=251189=gcc=rev
Log:
2017-08-18  Jerry DeLisle  

Backport from trunk
PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.

* gfortran.dg/array_temporaries_4.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/array_temporaries_4.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/trans-stmt.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-07-02 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||zeccav at gmail dot com

--- Comment #14 from Dominique d'Humieres  ---
*** Bug 80751 has been marked as a duplicate of this bug. ***

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-28 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #13 from Martin Liška  ---
(In reply to Jerry DeLisle from comment #12)
> Fixed on trunk, will backport to 7 in a few days.

Thanks for the fix!

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #12 from Jerry DeLisle  ---
Fixed on trunk, will backport to 7 in a few days.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #11 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed Jun 28 02:17:40 2017
New Revision: 249718

URL: https://gcc.gnu.org/viewcvs?rev=249718=gcc=rev
Log:
2017-06-27  Jerry DeLisle  

PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.

* gfortran.dg/array_temporaries_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/array_temporaries_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Jerry DeLisle  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED

--- Comment #10 from Jerry DeLisle  ---
(In reply to Jerry DeLisle from comment #9)
> Martin or Dominique, in looking at this I am unable to reproduce any
> failures. Was this for a specific platform? Mac, PowerPC ?

Disregard, I see it with -Warray-temporaries. It was not obvious to me at
first.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-27 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #9 from Jerry DeLisle  ---
Martin or Dominique, in looking at this I am unable to reproduce any failures.
Was this for a specific platform? Mac, PowerPC ?

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #8 from Dominique d'Humieres  ---
> I will take this over, test the proposed patch, and see where we get soon.

Great!

I have the patch in my working tree and it fixes the issue (even the ieee ones)
without regression.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-25 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #7 from Jerry DeLisle  ---
I will take this over, test the proposed patch, and see where we get soon.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-06-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #6 from Martin Liška  ---
Is there please any progress, I can confirm the suggested patch works for me.

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-03-23 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #5 from Steve Kargl  ---
On Thu, Mar 23, 2017 at 10:48:20PM +, dominiq at lps dot ens.fr wrote:
> 
> The additional errors are
> 
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90:82:69:
> 
>   pv((2_I4*i-1_I4):(2_I4*i))= iaef((/(2_I4*i-1_I4),(2_I4*i)/))
>  1
> Warning: Creating array temporary at (1) [-Warray-temporaries]
> 
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90:46:45:
> 
>x = (/a (0, 1),a (0, 2),a (0, 3),a (0, 4)/)
>  1
> 

These aren't errors.  These are warnings caused by the 
questionable addition of a specious warning option
wrecklessly added to the compiler options for testcases
that were never intended to be used in testing that
warning option.  gfortran created a temporary array
in these testcases.  So what?

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-03-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #4 from Dominique d'Humieres  ---
The patch in comment 2 fixes the failures

FAIL: gfortran.dg/where_operator_assign_2.f90   -O  (internal compiler error)
FAIL: gfortran.dg/where_operator_assign_3.f90   -O  (internal compiler error)
FAIL: gfortran.dg/where_operator_assign_1.f90   -O  (internal compiler error)

but not

FAIL: gfortran.dg/ieee/ieee_1.F90   -O*  (internal compiler error)
FAIL: gfortran.dg/ieee/large_3.F90   -O*  (internal compiler error)

The additional errors are

/opt/gcc/_clean/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90:82:69:

  pv((2_I4*i-1_I4):(2_I4*i))= iaef((/(2_I4*i-1_I4),(2_I4*i)/))
 1
Warning: Creating array temporary at (1) [-Warray-temporaries]

/opt/gcc/_clean/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90:46:45:

   x = (/a (0, 1),a (0, 2),a (0, 3),a (0, 4)/)
 1

Would it be possible to have a better location?

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-03-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

--- Comment #3 from Dominique d'Humieres  ---
*** Bug 79888 has been marked as a duplicate of this bug. ***

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-03-23 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
Index: trans-stmt.c
===
--- trans-stmt.c(revision 246099)
+++ trans-stmt.c(working copy)
@@ -452,7 +452,11 @@ gfc_trans_call (gfc_code * code, bool de
 subscripts.  This could be prevented in the elemental case
 as temporaries are handled separatedly
 (below in gfc_conv_elemental_dependencies).  */
-  gfc_conv_loop_setup (, >expr1->where);
+  if (code->expr1)
+   gfc_conv_loop_setup (, >expr1->where);
+  else
+   gfc_conv_loop_setup (, >loc);
+
   gfc_mark_ss_chain_used (ss, 1);

   /* Convert the arguments, checking for dependencies.  */

[Bug fortran/80164] ICE in gfc_format_decoder at gcc/fortran/error.c:933

2017-03-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80164

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-03-23
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Duplicate of pr79888?

Regtesting with
RUNTESTFLAGS="--target_board=unix'{-m32/-Warray-temporaries,-m64/-Warray-temporaries}'",
I see

FAIL: gfortran.dg/where_operator_assign_2.f90   -O  (internal compiler error)
FAIL: gfortran.dg/where_operator_assign_3.f90   -O  (internal compiler error)
FAIL: gfortran.dg/where_operator_assign_1.f90   -O  (internal compiler error)
FAIL: gfortran.dg/ieee/ieee_1.F90   -O*  (internal compiler error)
FAIL: gfortran.dg/ieee/large_3.F90   -O*  (internal compiler error)