[Bug fortran/93671] gfortran 8-10 ICE on intrinsic assignment to allocatable derived-type component of coarray

2020-08-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93671

vehre at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org
 CC||vehre at gcc dot gnu.org
 Status|NEW |ASSIGNED

[Bug fortran/93671] gfortran 8-10 ICE on intrinsic assignment to allocatable derived-type component of coarray

2020-08-10 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93671

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #3 from vehre at gcc dot gnu.org ---
Patch at https://gcc.gnu.org/pipermail/fortran/2020-August/054865.html

Waiting for review.

[Bug fortran/94958] gcc/fortran/trans-array.c:9797: possible typo ?

2020-08-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94958

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 CC||vehre at gcc dot gnu.org

--- Comment #3 from vehre at gcc dot gnu.org ---
That should clearly be:

  args.errmsg = errmsg;
  args.errmsg_len = errmsg_len;

I have to see, how this can be tested best in the gfortran testsuite, if
possible at all.

[Bug fortran/94958] gcc/fortran/trans-array.c:9797: possible typo ?

2020-08-18 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94958

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from vehre at gcc dot gnu.org ---
Further research showed, that the conseQuences of the mistake are not impacting
gfortran in any kind, because the errmsg and errmsg_len are never used. The
code here is jumped to only when a derived type containing an allocatable
component is broadcasted and then only in caf-lib-mode, e.g.:

! { dg-do compile }
!
! PR fortran/94958
!

implicit none

type struct
  integer, allocatable :: comp
end type

type(struct) :: a
character(kind=1, len=20) :: err
integer :: stat


call co_broadcast(a, this_image(), stat, err)
end

gfortran -fcoarray=lib bcast_1.f90 -lcaf_single

During traversal of the derived type for bcast, the function call to
CO_BROADCAST() for the type 'a' and it's allocatable component 'comp' is never
augmented with the nodes for stat, errmsg and errmsg_len. For this small
example the code already has two calls to co_broadcast. Which indicates the
necessity of having some way to aggregate the stat and errmsg over all these
calls. Unfortunately does the Fortran-standard (2015, 2018) not state how to
aggregate the stat and/or errmsg for multiple broadcasts.

I therefore propose a fix:
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 7a1b2fc74c9..73a45cd2dcf 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -9732,7 +9732,7 @@ gfc_bcast_alloc_comp (gfc_symbol *derived, gfc_expr
*expr, int rank,
   args.image_index = image_index;
   args.stat = stat;
   args.errmsg = errmsg;
-  args.errmsg = errmsg_len;
+  args.errmsg_len = errmsg_len;

   if (rank == 0)
 {

as obvious and get done with this pr.

[Bug fortran/94958] gcc/fortran/trans-array.c:9797: possible typo ?

2020-08-20 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94958

Andre Vehreschild  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #6 from Andre Vehreschild  ---
Waiting a week for regression before closing as fixed.

[Bug fortran/93671] gfortran 8-10 ICE on intrinsic assignment to allocatable derived-type component of coarray

2020-08-20 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93671

Andre Vehreschild  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Andre Vehreschild  ---
No complaints so far, closing.

[Bug fortran/96737] New: ICE when compiling module and submodule in same file

2020-08-21 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96737

Bug ID: 96737
   Summary: ICE when compiling module and submodule in same file
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

Latest gfortran ICE with:
   35 | end module
  | 
Error: 'TYPE_CANONICAL' is not compatible
  constant 960>
unit-size  constant 120>
align:64 warn_if_not_align:0 symtab:620683744 alias-set -1 canonical-type
0x7f1324fef000
fields  unit-size 
align:64 warn_if_not_align:0 symtab:620683824 alias-set -1
canonical-type 0x7f1324fef348 fields 
pointer_to_this  chain >
BLK ../build-gcc/opencoarrays/intel-18-works-onefile.f90:35:10 size
 unit-size 
align:64 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context > context 
pointer_to_this  reference_to_this
 chain >
  constant 1152>
unit-size  constant 144>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1324fef000
fields  unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1324c2c498 fields 
pointer_to_this  chain >
BLK ../build-gcc/opencoarrays/intel-18-works-onefile.f90:64:13 size
 unit-size 
align:64 warn_if_not_align:0 offset_align 128
offset 
bit-offset  context >
chain >
../build-gcc/opencoarrays/intel-18-works-onefile.f90:35:0: internal compiler
error: 'verify_type' failed
0x17b70de verify_type(tree_node const*)
/home/vehre/Projekte/gcc/gcc.orig/gcc/tree.c:14744
0xd38de7 gen_type_die_with_usage
/home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:25500
0xd39a1a gen_type_die
/home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:25730
0xd3b95b gen_decl_die
/home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26362
0xd3ce96 dwarf2out_decl
/home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26910
0xd3c2f9 dwarf2out_type_decl
/home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26635
0x11b6fa3 rest_of_type_compilation(tree_node*, int)
/home/vehre/Projekte/gcc/gcc.orig/gcc/passes.c:339
0xb70435 gfc_finish_type(tree_node*)
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2327
0xb71ce0 gfc_get_derived_type(gfc_symbol*, int)
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2812
0xb6c943 gfc_typenode_for_spec(gfc_typespec*, int)
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:1166
0xb700ce gfc_sym_type(gfc_symbol*)
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2247
0xac977d gfc_get_symbol_decl(gfc_symbol*)
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-decl.c:1769
0xad70b2 gfc_create_module_variable
/home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-decl.c:5307

when compiling the example from:

https://github.com/sourceryinstitute/AdHoc/blob/master/src/gnu/nrc/coarray-with-nested-allocatable-components/intel-18-works.f90

[Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g)

2020-08-23 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96737

--- Comment #3 from Andre Vehreschild  ---
Sorry, I was in a hurry to post the pr. You're right one needs to specify '-g'
to see the issue.

[Bug fortran/94958] gcc/fortran/trans-array.c:9797: possible typo ?

2020-08-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94958

Andre Vehreschild  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

[Bug fortran/96418] Test coarray_alloc_comp_4.f08 ICEs

2020-08-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96418

Andre Vehreschild  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from Andre Vehreschild  ---
Well, it's better not to try to ref a non-array as an array.

[Bug fortran/79097] coarray and pointer component

2020-08-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79097

Andre Vehreschild  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Andre Vehreschild  ---
Using gcc of trunk a recent opencoarray including pull reQuest
https://github.com/sourceryinstitute/OpenCoarrays/pull/714 this works for me.
Testing with valgrind reported no issues.

[Bug fortran/83700] [Meta-bug] Fortran Coarray issues

2020-08-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83700
Bug 83700 depends on bug 79097, which changed state.

Bug 79097 Summary: coarray and pointer component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79097

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

[Bug fortran/96418] Test coarray_alloc_comp_4.f08 ICEs

2020-08-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96418

Andre Vehreschild  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #5 from Andre Vehreschild  ---
Patch submitted as:
https://gcc.gnu.org/pipermail/fortran/2020-August/054943.html
Waiting for review.

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-04-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #5 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 14 14:45:59 2018
New Revision: 259385

URL: https://gcc.gnu.org/viewcvs?rev=259385&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-14  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-14  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
trunk/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 14 14:45:59 2018
New Revision: 259385

URL: https://gcc.gnu.org/viewcvs?rev=259385&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-14  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-14  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
trunk/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-04-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from vehre at gcc dot gnu.org ---
Fixed by r259385.

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from vehre at gcc dot gnu.org ---
Fxied by r259385.

[Bug fortran/83700] [Meta-bug] Fortran Coarray issues

2018-04-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83700
Bug 83700 depends on bug 81773, which changed state.

Bug 81773 Summary: [Coarray] Get with vector index on lhs leads to incorrect 
caf_get_by_ref() call.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

   What|Removed |Added

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

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-15 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #7 from vehre at gcc dot gnu.org ---
Backporting to gcc-6 and -7 is possible. The patch applies cleanly and all
regression tests pass.

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #8 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 28 14:54:09 2018
New Revision: 259741

URL: https://gcc.gnu.org/viewcvs?rev=259741&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
   
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
   
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-array.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-04-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #8 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 28 14:54:20 2018
New Revision: 259742

URL: https://gcc.gnu.org/viewcvs?rev=259742&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
   
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
   
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/dependency.c
branches/gcc-7-branch/gcc/fortran/trans-array.c
branches/gcc-7-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 28 14:54:20 2018
New Revision: 259742

URL: https://gcc.gnu.org/viewcvs?rev=259742&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
   
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
   
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/dependency.c
branches/gcc-7-branch/gcc/fortran/trans-array.c
branches/gcc-7-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-04-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #7 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sat Apr 28 14:54:09 2018
New Revision: 259741

URL: https://gcc.gnu.org/viewcvs?rev=259741&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
   
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indexed_array_1.f90
   
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray/get_to_indirect_array.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-array.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/85507] [8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-04-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #5 from vehre at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #4)
> > The ICE is gone if I revert the change in dependency.c from r259385.
> 
> This regtests cleanly.

Well, it regtests cleanly, but produces incorrect code. The detection, that
x[2] and x reference the same variable and may require a temporary in the
assignment (at least when we are on image 2) is not assessed correctly.

[Bug fortran/85507] [8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-04-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #6 from vehre at gcc dot gnu.org ---
Candidate patch available here:
https://gcc.gnu.org/ml/fortran/2018-04/msg00120.html

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #8 from vehre at gcc dot gnu.org ---
Just now. OC 2.0 compiles fine with the proposed patch. I am just now working
on getting the remaining get-send-issues fixed for gcc-8 in OC 2.0+.

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #10 from vehre at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #9)
> > Thanks for the proposed bugfix. Did you check that also OpenCoarrays 2.0
> > compiles again with this fix?
> 
> It does with reverting the change in dependency.c with two failures in the
> test suite:
> 
>17 - alloc_comp_multidim_shape (Failed)
>56 - get-put-allocatable-comp (Failed)

Well, that's kind of misleading. The change in the dependency.c introduced by
the patch I proposed above should not be reverted. This patch rather reverts
one of my previous patches.

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #12 from vehre at gcc dot gnu.org ---
This patch is not referring to the failures in Opencoarrays. The fix for #56 is
in Opencoarray's pull request #528. The other one has nothing to do with this
initial issue and is not of my current concern.

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #16 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 11:19:31 2018
New Revision: 259974

URL: https://gcc.gnu.org/viewcvs?rev=259974&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dependency.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #17 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 11:52:46 2018
New Revision: 259977

URL: https://gcc.gnu.org/viewcvs?rev=259977&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/dependency.c
branches/gcc-7-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:14:11 2018
New Revision: 259978

URL: https://gcc.gnu.org/viewcvs?rev=259978&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:14:11 2018
New Revision: 259978

URL: https://gcc.gnu.org/viewcvs?rev=259978&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation.  They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
indexing.

gcc/testsuite/ChangeLog:

2018-04-28  Andre Vehreschild  

PR fortran/81773
PR fortran/83606
Backport from trunk
* gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
* gfortran.dg/coarray/get_to_indirect_array.f90: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/dependency.c
branches/gcc-6-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #18 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

--- Comment #11 from vehre at gcc dot gnu.org ---
Author: vehre
Revision: 259978
Modified property: svn:log

Modified: svn:log at Sun May  6 12:20:52 2018
--
--- svn:log (original)
+++ svn:log Sun May  6 12:20:52 2018
@@ -1,25 +1,21 @@
 gcc/fortran/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
-   during dependency computation.  They define no data dependency.
-   * trans-array.c (conv_array_index_offset): The stride can not be set
-   here, prevent fail.
-   * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
-   for caf_get's result and copying to the array with vectorial
-   indexing.
+PR fortran/85507
+Backport from trunk.
+* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
+introduced by r259385.
+* trans-intrinsic.c (conv_caf_send): Always report a dependency for
+same variables in coarray assignments.

 gcc/testsuite/ChangeLog:

-2018-04-28  Andre Vehreschild  
+2018-05-06  Andre Vehreschild  

-   PR fortran/81773
-   PR fortran/83606
-   Backport from trunk
-   * gfortran.dg/coarray/get_to_indexed_array_1.f90: New test.
-   * gfortran.dg/coarray/get_to_indirect_array.f90: New test.
+PR fortran/85507
+Backport from trunk.
+* gfortran.dg/coarray_dependency_1.f90: New test.
+* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.

+

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-05-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

--- Comment #19 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun May  6 12:33:07 2018
New Revision: 259979

URL: https://gcc.gnu.org/viewcvs?rev=259979&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.

gcc/testsuite/ChangeLog:

2018-05-06  Andre Vehreschild  

PR fortran/85507
Backport from trunk.
* gfortran.dg/coarray_dependency_1.f90: New test.
* gfortran.dg/coarray_lib_comm_1.f90: Fix counting caf-expressions.


Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/coarray_dependency_1.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/dependency.c
branches/gcc-8-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90

[Bug fortran/85507] [6/7/8/9 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2258

2018-09-07 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85507

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #22 from vehre at gcc dot gnu.org ---
Er, sorry, just forgot to close.
Didn't get any further reports therefore closing as fixed.

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-02-18 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #3 from vehre at gcc dot gnu.org ---
Created attachment 43451
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43451&action=edit
Preliminary patch

First shot on fixing the issue. At least for caf_get() it fixes the issue.

[Bug fortran/83606] [6/7/8 Regression] co-indexed array RHS yields incorrect result in assignment to vector-indexed LHS

2018-04-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83606

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #3 from vehre at gcc dot gnu.org ---
Candidate patch available at:
https://gcc.gnu.org/ml/fortran/2018-04/msg00027.html

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2018-04-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from vehre at gcc dot gnu.org ---
Candidate patch available at:
https://gcc.gnu.org/ml/fortran/2018-04/msg00027.html

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Jan 27 14:48:04 2016
New Revision: 232876

URL: https://gcc.gnu.org/viewcvs?rev=232876&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-01-27  Andre Vehreschild  

PR fortran/69268
* gfortran.dg/allocatable_scalar_13.f90: Fixing counts of malloc/
free to fit the actual number of calls.
* gfortran.dg/allocate_with_source_16.f90: New test.


gcc/fortran/ChangeLog:

2016-01-27  Andre Vehreschild  

PR fortran/69268
* trans-stmt.c (gfc_trans_allocate): Make sure the source=
expression is evaluated once only. Use gfc_trans_assignment ()
instead of explicitly calling gfc_trans_string_copy () to
reduce the code complexity in trans_allocate.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocate_with_source_16.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-stmt.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocatable_scalar_13.f90

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-27 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING

[Bug fortran/62536] ICE (segfault) for invalid END BLOCK statement

2016-01-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62536

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Thu Jan 28 10:36:30 2016
New Revision: 232918

URL: https://gcc.gnu.org/viewcvs?rev=232918&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-01-28  Andre Vehreschild  

PR fortran/62536
* gfortran.dg/block_14.f08: New test.


gcc/fortran/ChangeLog:

2016-01-28  Andre Vehreschild  

PR fortran/62536
* decl.c: Prevent setting gfc_current_ns to NULL when block statement's
nesting is incomplete.  There is already an error conditon, so having
gfc_current_ns pointing to an eventually wrong namespace does not
matter
that much.


Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/62536] ICE (segfault) for invalid END BLOCK statement

2016-01-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62536

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Thu Jan 28 11:34:03 2016
New Revision: 232919

URL: https://gcc.gnu.org/viewcvs?rev=232919&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-01-28  Andre Vehreschild  

PR fortran/62536
* decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
when the END encountered does not match a BLOCK's end.

gcc/testsuite/ChangeLog:

2016-01-28  Andre Vehreschild  

PR fortran/62536
* gfortran.dg/block_15.f08: New test.
* gfortran.dg/block_end_error_1.f90: Need to catch additional error
on incorrectly closed BLOCK.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/block_end_error_1.f90

[Bug fortran/62536] ICE (segfault) for invalid END BLOCK statement

2016-01-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62536

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #11 from vehre at gcc dot gnu.org ---
Waiting one week for issue reports on this, before closing as resolved.

[Bug fortran/67451] [5/6 Regression] ICE with sourced allocation from coarray.

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/69418] [5/6 Regression] ICE: tree check: expected record_type ... in gfc_class_vptr_get, at fortran/trans-expr.c:149

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69418

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/69418] [5/6 Regression] ICE: tree check: expected record_type ... in gfc_class_vptr_get, at fortran/trans-expr.c:149

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69418

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

[Bug fortran/69418] [5/6 Regression] ICE: tree check: expected record_type ... in gfc_class_vptr_get, at fortran/trans-expr.c:149

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69418

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from vehre at gcc dot gnu.org ---
Same as pr67451. The unlimited polymorphism is no issue here.
A testcase for this is added in the patch for 67451
gfortran.dg/coarray_allocate_4.f08
.

*** This bug has been marked as a duplicate of bug 67451 ***

[Bug fortran/67451] [5/6 Regression] ICE with sourced allocation from coarray.

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 CC||gerhard.steinmetz.fortran@t
   ||-online.de

--- Comment #3 from vehre at gcc dot gnu.org ---
*** Bug 69418 has been marked as a duplicate of this bug. ***

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-01-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 CC||vehre at gcc dot gnu.org

--- Comment #2 from vehre at gcc dot gnu.org ---
Investigation shows, that the pseudo code (-fdump-tree-original) is wrong at:

  c.caf.data = 0B;
  {
integer(kind=4) stat.0;

if (c.caf.data != 0B)
  {
stat.0 = 5014;
  }
else
  {
stat.0 = 0;
c.caf.data = __builtin_malloc (8);
if (c.caf.data == 0B)
  {
stat.0 = 5014;
  }
  }
if (stat.0 == 0)
  {
c.caf.dtype = 552;
c.caf.dim[0].lbound = 1;
  }
c.caf.x = 0B; ! <<<<<< HERE 
if (stat.0 != 0) goto L.1;
L.1:;
stat = stat.0;

.caf has no member x. The component x is from t2 and I assume this line is not
intended, but I had no time yet to figure where it stems from.

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-01-31 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

--- Comment #6 from vehre at gcc dot gnu.org ---
I am waiting for one week to pass without complaints before closing the pr as
resolved fixed to prevent resolved -> reopened cycles. Will mark as resolved ->
fixed on Feb. 3,. Sorry for not communicating more precisely.

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #4 from vehre at gcc dot gnu.org ---
Patch for trunk:

https://gcc.gnu.org/ml/fortran/2016-01/msg00093.html

"Backported" patch for gcc-5:

https://gcc.gnu.org/ml/fortran/2016-02/msg1.html

Waiting for reviews.

[Bug fortran/69296] [6 Regression] [F03] Problem with associate and vector subscript

2016-02-01 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69296

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/69296] [6 Regression] [F03] Problem with associate and vector subscript

2016-02-02 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69296

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #5 from vehre at gcc dot gnu.org ---
Candidate patch submitted at:

https://gcc.gnu.org/ml/fortran/2016-02/msg8.html

Waiting for review.

[Bug fortran/69268] [5 Regression] Sourced allocation calls function twice

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from vehre at gcc dot gnu.org ---
No complaints so far closing as fixed.

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

--- Comment #5 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Feb  3 09:44:18 2016
New Revision: 233099

URL: https://gcc.gnu.org/viewcvs?rev=233099&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* gfortran.dg/coarray_allocate_2.f08: New test.
* gfortran.dg/coarray_allocate_3.f08: New test.
* gfortran.dg/coarray_allocate_4.f08: New test.


gcc/fortran/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
pointer is passed.  Take it as is without trying to deref the
_data component.
* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
argument to source=-expression.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-expr.c
branches/gcc-5-branch/gcc/fortran/trans-stmt.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/69418] [5/6 Regression] ICE: tree check: expected record_type ... in gfc_class_vptr_get, at fortran/trans-expr.c:149

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69418

--- Comment #5 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Feb  3 09:44:18 2016
New Revision: 233099

URL: https://gcc.gnu.org/viewcvs?rev=233099&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* gfortran.dg/coarray_allocate_2.f08: New test.
* gfortran.dg/coarray_allocate_3.f08: New test.
* gfortran.dg/coarray_allocate_4.f08: New test.


gcc/fortran/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
pointer is passed.  Take it as is without trying to deref the
_data component.
* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
argument to source=-expression.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-expr.c
branches/gcc-5-branch/gcc/fortran/trans-stmt.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/69418] [5/6 Regression] ICE: tree check: expected record_type ... in gfc_class_vptr_get, at fortran/trans-expr.c:149

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69418

--- Comment #6 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Feb  3 10:39:09 2016
New Revision: 233101

URL: https://gcc.gnu.org/viewcvs?rev=233101&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* gfortran.dg/coarray_allocate_2.f08: New test.
* gfortran.dg/coarray_allocate_3.f08: New test.
* gfortran.dg/coarray_allocate_4.f08: New test.


gcc/fortran/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
pointer is passed.  Take it as is without trying to deref the
_data component.
* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
argument to source=-expression.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

--- Comment #6 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Wed Feb  3 10:39:09 2016
New Revision: 233101

URL: https://gcc.gnu.org/viewcvs?rev=233101&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* gfortran.dg/coarray_allocate_2.f08: New test.
* gfortran.dg/coarray_allocate_3.f08: New test.
* gfortran.dg/coarray_allocate_4.f08: New test.


gcc/fortran/ChangeLog:

2016-02-03  Andre Vehreschild  

PR fortran/67451
PR fortran/69418
* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
pointer is passed.  Take it as is without trying to deref the
_data component.
* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
argument to source=-expression.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_2.f08
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_3.f08
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_4.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423

--- Comment #4 from vehre at gcc dot gnu.org ---
Hi Paul,

I will have a look at it today. May be a fresh pair of eyes can be of help.

- Andre

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

--- Comment #7 from vehre at gcc dot gnu.org ---
Commited fix; waiting one week for error reports before closing.

[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character

2016-02-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423

--- Comment #6 from vehre at gcc dot gnu.org ---
What I have learnt so far:

When the gimple optimisation algorithm 'remove_unused_locals ()' in
gcc/tree-ssa-live.c is done, it has removed the temporary for the
_gfortran_transfer_character_write's string length. In the previous analysis
step this (ssa-)temporary has the uid 3471 in my current fortran. That var
occurs in two basicblocks (bb), once in  of ssa, where it is only used to
check whether a preallocated incoming string has the correct length. That whole
bb can be eliminated, because it is unreachable which can be deduced from the
propagated attributes. But in the  it must not be eliminated as well.
Because in both bbs the uid of the temporary is the same, I tried several ways
to prevent this association (adding a further temporary using gfc_evaluate_now
(), copying the tree using copy_node ()), but to no avail yet. 

Having said this my assumption is, that at both occurrences of .__result_4 the
exactly same tree is used (and not a separate copy in each place). Maybe this
is the issue, but I am still investigating. Just thought to let you know
whether anything of this rings a bell.

[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character

2016-02-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423

--- Comment #8 from vehre at gcc dot gnu.org ---
I recognize most of the code your patch strips, because I initially
wrote/modified it to get the deferred length character arrays working. I am
somewhat unconvinced that removing them is safe.

[Bug fortran/62536] ICE (segfault) for invalid END BLOCK statement

2016-02-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62536

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character

2016-02-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423

--- Comment #9 from vehre at gcc dot gnu.org ---
Created attachment 37579
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37579&action=edit
Clear explicit function result variables for deferred length char arrays

Well, using the explicit result declaration of comment #3 the code is far less
optimized. Furthermore are the .__result and __result parameters in the code of
comment #3 not cleared in tree-original.

When I add this clearing by modifying trans-decl.c (gfc_trans_deferred_vars (),
see attached patch1.txt), i.e.,

__.003t.original:
test (character(kind=1)[1:*.__result] * & __result, integer(kind=4) *
.__result, integer(kind=4) & restrict alen)
{
  integer(kind=4) i;

  *.__result = 0;
  *__result = 0B;
...

then I get the same result, like in the original program. The question is, does
this information help us in any way?

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-10 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

--- Comment #11 from vehre at gcc dot gnu.org ---
Patch at:

https://gcc.gnu.org/ml/fortran/2016-02/msg00033.html

Waiting for review and approval of bugreporters whether the patch fixes the
issue or not.

[Bug fortran/69296] [6 Regression] [F03] Problem with associate and vector subscript

2016-02-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69296

--- Comment #6 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Thu Feb 11 16:48:45 2016
New Revision: 233351

URL: https://gcc.gnu.org/viewcvs?rev=233351&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-02-11  Andre Vehreschild  

PR fortran/69296
* gfortran.h: Added flag to gfc_association_list indicating that
the rank of an associate variable has been guessed only.
* parse.c (parse_associate): Set the guess flag mentioned above
when guessing the rank of an expression.
* resolve.c (resolve_assoc_var): When the rank has been guessed,
make sure, that the guess was correct else overwrite with the actual
rank.
* trans-stmt.c (trans_associate_var): For subref_array_pointers in
class objects, take the span from the _data component.

gcc/testsuite/ChangeLog:

2016-02-11  Andre Vehreschild  

PR fortran/69296
* gfortran.dg/associate_19.f03: New test.
* gfortran.dg/associate_20.f03: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/associate_19.f03
trunk/gcc/testsuite/gfortran.dg/associate_20.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69296] [6 Regression] [F03] Problem with associate and vector subscript

2016-02-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69296

--- Comment #7 from vehre at gcc dot gnu.org ---
Waiting one week for any regressions before closing.

[Bug fortran/69296] [6 Regression] [F03] Problem with associate and vector subscript

2016-02-23 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69296

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from vehre at gcc dot gnu.org ---
No regressions reported, closing.

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-02-23 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

--- Comment #14 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Tue Feb 23 10:29:26 2016
New Revision: 233625

URL: https://gcc.gnu.org/viewcvs?rev=233625&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-02-23  Andre Vehreschild  

PR fortran/67451
* gfortran.dg/coarray_allocate_5.f08: New test.


gcc/fortran/ChangeLog:

2016-02-23  Andre Vehreschild  

PR fortran/67451
* trans-array.c (gfc_array_allocate): Take the attributes from the
expression to allocate and not from the source=-expression.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_5.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/67451] [5/6 Regression] [F08] ICE with sourced allocation from coarray.

2016-03-14 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/70397] [5/6 Regression] ice while allocating ultimate polymorphic

2016-03-28 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397

--- Comment #2 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Mar 28 16:29:14 2016
New Revision: 234507

URL: https://gcc.gnu.org/viewcvs?rev=234507&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-03-28  Andre Vehreschild  

PR fortran/70397
* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
constant zero tree, when the class to get the _len component from is
not unlimited polymorphic.
(gfc_copy_class_to_class): Use the new function.
* trans.h: Added interface of new function gfc_class_len_or_zero_get.

gcc/testsuite/ChangeLog:

2016-03-28  Andre Vehreschild  

PR fortran/70397
* gfortran.dg/unlimited_polymorphic_25.f90: New test.
* gfortran.dg/unlimited_polymorphic_26.f90: New test.



Added:
   
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90
   
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-expr.c
branches/gcc-5-branch/gcc/fortran/trans.h
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/70397] [5/6 Regression] ice while allocating ultimate polymorphic

2016-03-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #3 from vehre at gcc dot gnu.org ---
Waiting for review of patch for trunk.

[Bug fortran/70397] [5/6 Regression] ice while allocating ultimate polymorphic

2016-03-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Tue Mar 29 16:54:24 2016
New Revision: 234528

URL: https://gcc.gnu.org/viewcvs?rev=234528&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-03-29  Andre Vehreschild  

PR fortran/70397
* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
constant zero tree, when the class to get the _len component from is
not unlimited polymorphic.
(gfc_copy_class_to_class): Use the new function.
* trans.h: Added interface of new function gfc_class_len_or_zero_get.

gcc/testsuite/ChangeLog:

2016-03-29  Andre Vehreschild  

PR fortran/70397
* gfortran.dg/unlimited_polymorphic_25.f90: New test.
* gfortran.dg/unlimited_polymorphic_26.f90: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/unlimited_polymorphic_25.f90
trunk/gcc/testsuite/gfortran.dg/unlimited_polymorphic_26.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog

[Bug fortran/70397] [5/6 Regression] ice while allocating ultimate polymorphic

2016-03-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397

--- Comment #5 from vehre at gcc dot gnu.org ---
Waiting one week for any new regressions introduced by this patch.

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-04-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #3 from vehre at gcc dot gnu.org ---
Initial patch submitted:

https://gcc.gnu.org/ml/fortran/2016-04/msg9.html

awaiting review.

[Bug fortran/66911] ICE on allocate character with source as a derived type component

2016-04-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #7 from vehre at gcc dot gnu.org ---
For 6.0 the pr is fixed already.
For gcc-5 a patch is available in:

https://gcc.gnu.org/ml/fortran/2016-04/msg00010.html

awaiting review.

[Bug fortran/67538] ICE with invalid source allocation

2016-04-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67538

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #4 from vehre at gcc dot gnu.org ---
Patch submitted as:

https://gcc.gnu.org/ml/fortran/2016-04/msg00011.html

awaiting review.

[Bug fortran/69659] [6 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get

2016-04-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #5 from vehre at gcc dot gnu.org ---
Created attachment 38169
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38169&action=edit
Patch proposal to fix the ICE.

Hi Gerhard,

although I am doing gfortran bugfixing for quite some time now, I haven't done
the "validation run with option -frepack-arrays" yet. I found that I could add 

RUNTESTFLAGS="--target_board=unix/-frepack-arrays" 

to the make check-fortran run, but this presents me with a multitude of failing
testcases. So obviously I am doing something wrong.

Attached is a patch that fixes the issue for some of the testcases you
enumerated in comment #1. I haven't busied myself to check each of the
testcases, but picked about 5 from the list and checked, that the patch fixes
the issue.

Can you confirm that the patch fixes the issue in all cases and does not raise
new issues?

Regards,
Andre

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

--- Comment #4 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Apr  4 09:32:28 2016
New Revision: 234710

URL: https://gcc.gnu.org/viewcvs?rev=234710&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/65795
* trans-array.c (gfc_array_allocate): When the array is a coarray,
do not nullyfing its allocatable components in array_allocate, because
the nullify missed the array ref and nullifies the wrong component.
Cosmetics.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/65795
* gfortran.dg/coarray_allocate_6.f08: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

--- Comment #5 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Apr  4 09:33:54 2016
New Revision: 234711

URL: https://gcc.gnu.org/viewcvs?rev=234711&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/65795
* trans-array.c (gfc_array_allocate): When the array is a coarray,
do not nullyfing its allocatable components in array_allocate, because
the nullify missed the array ref and nullifies the wrong component.
Cosmetics.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/65795
* gfortran.dg/coarray_allocate_6.f08: New test.



Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/coarray_allocate_6.f08
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-array.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

--- Comment #6 from vehre at gcc dot gnu.org ---
Waiting one week for regression reports before closing.

[Bug fortran/70397] [5/6 Regression] ice while allocating ultimate polymorphic

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70397

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/66911] ICE on allocate character with source as a derived type component

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

--- Comment #8 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Apr  4 09:47:47 2016
New Revision: 234712

URL: https://gcc.gnu.org/viewcvs?rev=234712&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/66911
* trans-stmt.c (gfc_trans_allocate): Get the deferred length of an
expression by converting the expression when the length is not set
in the symbol's ts.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/66911
* gfortran.dg/deferred_character_16.f90: New test.



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

[Bug fortran/66911] ICE on allocate character with source as a derived type component

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

--- Comment #9 from vehre at gcc dot gnu.org ---
Waiting one week for regressions before closing.

[Bug fortran/67538] ICE with invalid source allocation

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67538

--- Comment #5 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Apr  4 10:32:32 2016
New Revision: 234714

URL: https://gcc.gnu.org/viewcvs?rev=234714&root=gcc&view=rev
Log:
gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/67538
* resolve.c (resolve_allocate_expr): Emit error message when no
array spec and no array valued source= expression is given in an
F2008 allocate() for an array to allocate.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  

PR fortran/67538
* gfortran.dg/allocate_with_source_19.f08: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/allocate_with_source_19.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/67538] ICE with invalid source allocation

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67538

--- Comment #6 from vehre at gcc dot gnu.org ---
Waiting one week for regressions before closing.

[Bug fortran/70524] [5/6 Regression] ICE when using -frepack-arrays -Warray-temporaries

2016-04-04 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70524

--- Comment #3 from vehre at gcc dot gnu.org ---
Oh no, not again gfc_trans_dummy_array_bias...

[Bug fortran/65795] Segfault (invalid write) for ALLOCATE statement involving COARRAYS

2016-04-17 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65795

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/66911] ICE on allocate character with source as a derived type component

2016-04-17 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66911

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/67538] ICE with invalid source allocation

2016-04-17 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67538

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from vehre at gcc dot gnu.org ---
No complaints so far, closing.

[Bug fortran/69659] [6/7 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get

2016-06-05 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun Jun  5 17:20:54 2016
New Revision: 237105

URL: https://gcc.gnu.org/viewcvs?rev=237105&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-06-05  Andre Vehreschild  

PR fortran/69659
* gfortran.dg/class_array_22.f03: New test.


gcc/fortran/ChangeLog:

2016-06-05  Andre Vehreschild  

PR fortran/69659
* trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
the address of the _data component to reference the arrays data
component.


Added:
trunk/gcc/testsuite/gfortran.dg/class_array_22.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69659] [6/7 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get

2016-06-05 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun Jun  5 18:09:27 2016
New Revision: 237107

URL: https://gcc.gnu.org/viewcvs?rev=237107&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

2016-06-05  Andre Vehreschild  

PR fortran/69659
* gfortran.dg/class_array_22.f03: New test.


gcc/fortran/ChangeLog:

2016-06-05  Andre Vehreschild  

PR fortran/69659
* trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
the address of the _data component to reference the arrays data
component.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/class_array_22.f03
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/trans-array.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/69659] [6/7 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get

2016-06-05 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

--- Comment #11 from vehre at gcc dot gnu.org ---
Waiting one week for any regressions to occur before closing.

[Bug fortran/69659] [6/7 Regression] ICE on using option -frepack-arrays, in gfc_conv_descriptor_data_get

2016-06-12 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69659

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from vehre at gcc dot gnu.org ---
No complaints received, closing.

[Bug fortran/81773] New: [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2017-08-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

Bug ID: 81773
   Summary: [Coarray] Get with vector index on lhs leads to
incorrect caf_get_by_ref() call.
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

Created attachment 41951
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41951&action=edit
Dump

Fortran code like:

tv(loc_idx(1:nhl,ip)) = xv%v(rmt_idx(1:nhl,ip))[xchg(ip)]

leads to the generation of pseudo-code:

  atmp.33.dtype = 281;
  atmp.33.dim[0].stride = 1;
  atmp.33.dim[0].lbound = 0;
  atmp.33.dim[0].ubound = 1;
  atmp.33.data = (void * restrict) &A.34;
  atmp.33.offset = 0;
  {
integer(kind=8) S.35;

S.35 = 0;
while (1)
  {
if (S.35 > 1) goto L.26;
{
  integer(kind=4) D.3704;

  D.3704 = (*(integer(kind=4)[0:] *)
parm.32.data)[parm.32.dim[0].stride * NON_LVALUE_EXPR ];
  (*(real(kind=4)[2] * restrict) atmp.33.data)[S.35] =
(*D.3696)[(integer(kind=8)) D.3704 + D.3697];
}
S.35 = S.35 + 1;
  }
L.26:;
  }
  atmp.33.dtype = 281;
  caf_ref.36.type = 1;

  __asm__ __volatile__("":::"memory");
  _gfortran_caf_get_by_ref (xv.v.token, ((*(integer(kind=4)[0:] *
restrict) xchg.data)[xchg.offset + (integer(kind=8)) ip] - (integer(kind=4))
xv.v.dim[1].lbound) + 1, &atmp.33, &caf_ref.36, 4, 4, 0, 0, 0B);

without copying back the result afterwards. In fact is the while(1) loop above
unnecessary, because atmp.33 is write-only in this call.

Example and dump attached.

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2017-08-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

vehre at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||vehre at gcc dot gnu.org
   Severity|minor   |normal

[Bug fortran/81773] [Coarray] Get with vector index on lhs leads to incorrect caf_get_by_ref() call.

2017-08-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81773

--- Comment #1 from vehre at gcc dot gnu.org ---
Created attachment 41952
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41952&action=edit
Example producing the bug

  1   2   3   4   5   6   7   8   >