[Bug fortran/92621] Problems with memory handling with allocatable intent(out) arrays with bind(c)

2021-04-28 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92621

--- Comment #12 from José Rui Faustino de Sousa  ---
(In reply to Dominique d'Humieres from comment #11)
> Did you try to click on 'take' in
> 
> Assignee: 
> Not yet assigned to anyone (edit) (take)
> 

I do not have the "edit" or "take" links and if I click "Not yet assigned to
anyone" it tries to send an email to "unassig...@gcc.gnu.org"...

Thank you very much.

Best regards,
José Rui

[Bug fortran/92621] Problems with memory handling with allocatable intent(out) arrays with bind(c)

2021-04-28 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92621

--- Comment #10 from José Rui Faustino de Sousa  ---
(In reply to Dominique d'Humieres from comment #9)
> > Patch (version 2) posted:
> >
> > https://gcc.gnu.org/pipermail/fortran/2021-April/055991.html
> 
> Please assign the PR to yourself when you submit a patch!

Sorry to bother you, but how do I assign the PR?

I don't think I have the necessary permissions, but I may be missing something
obvious...

Thank you very much.

Best regards,
José Rui

[Bug fortran/92621] Problems with memory handling with allocatable intent(out) arrays with bind(c)

2021-04-26 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92621

--- Comment #8 from José Rui Faustino de Sousa  ---
Patch (version 2) posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055991.html

[Bug fortran/100245] ICE on automatic reallocation

2021-04-25 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100245

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055982.html

[Bug fortran/100245] New: ICE on automatic reallocation

2021-04-24 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100245

Bug ID: 100245
   Summary: ICE on automatic reallocation
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50667=edit
Fortran code showing problem

Hi All!

Automatic reallocation ICEs when assigning class to derived type.

Seen on:

GNU Fortran (GCC) 12.0.0 20210424 (experimental)
GNU Fortran (GCC) 11.0.1 20210424 (prerelease)
GNU Fortran (GCC) 10.3.1 20210424
GNU Fortran (GCC) 9.3.1 20210424

Thank you very much.

Best regards,
José Rui

[Bug fortran/82376] Duplicate function call using -fcheck=pointer

2021-04-22 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82376

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055973.html

[Bug fortran/100136] [11/12 Regression] ICE, regression, using flag -fcheck=pointer

2021-04-21 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100136

--- Comment #3 from José Rui Faustino de Sousa  ---
Only handles the ICE...

Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055949.html

[Bug fortran/100136] New: ICE, regression, using flag -fcheck=pointer

2021-04-18 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100136

Bug ID: 100136
   Summary: ICE, regression, using flag -fcheck=pointer
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50623
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50623=edit
Fortran code showing problem

Hi All!

ICE using flag -fcheck=pointer.

Seen on:

GNU Fortran (GCC) 11.0.1 20210417 (experimental)

Older versions don't ICE, but don't do any checking either...

Thank you very much.

Best regards,
José Rui

[Bug fortran/100132] Optimization breaks pointer association

2021-04-17 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100132

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted

https://gcc.gnu.org/pipermail/fortran/2021-April/055946.html

[Bug fortran/100132] New: Optimization breaks pointer association

2021-04-17 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100132

Bug ID: 100132
   Summary: Optimization breaks pointer association
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50622
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50622=edit
Fortran code showing problem

Hi All!

Pointer association is lost when compiling with -O1 or -O2, curiously not with
-O3 unless -fcheck=recursion is used

Seen on:

GNU Fortran (GCC) 11.0.1 20210417 (experimental)
GNU Fortran (GCC) 10.3.1 20210417
GNU Fortran (GCC) 9.3.1 20210417

Thank you very much.

Best regards,
José Rui

[Bug fortran/100120] associated intrinsic failure

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100120

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055942.html

[Bug fortran/100098] Polymorphic pointers and allocatables have incorrect rank

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100098

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055933.html

[Bug fortran/100097] Unlimited polymorphic pointers and allocatables have incorrect rank

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100097

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055933.html

[Bug fortran/100094] Undefined pointers have incorrect rank when using optimization

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100094

--- Comment #3 from José Rui Faustino de Sousa  ---
(In reply to kargl from comment #1)
> Isn't the code invalid Fortran because it references an undefined pointer?
> If yes, the compiler is allows to do whatever it wants with the code.

AFAIK that is correct off all the "associate-like" constructs, the only
exception is select rank.

11.1.10.3 Attributes of a SELECT RANK associate name, paragraph 3:

"The associating entity has the ALLOCATABLE, POINTER, or TARGET attribute if
the selector has that attribute. The other attributes of the associating entity
are described in 11.1.3.3."

Best regards,
José Rui

[Bug fortran/100040] Wrong code with intent out assumed-rank allocatable

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100040

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055924.html

[Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100029

--- Comment #2 from José Rui Faustino de Sousa  ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055924.html

[Bug fortran/100120] New: associated intrinsic failure

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100120

Bug ID: 100120
   Summary: associated intrinsic failure
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50617
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50617=edit
Fortran code showing problem

Associated intrinsic returns wrong results with polymorphic pointers.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415
GNU Fortran (GCC) 9.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100118] New: ICE on sizeof with derived type components

2021-04-16 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100118

Bug ID: 100118
   Summary: ICE on sizeof with derived type components
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50616
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50616=edit
Fortran code showing problem

ICE on using sizeof with derived type components.

seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415
GNU Fortran (GCC) 9.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100103] New: Automatic reallocation fails inside select rank

2021-04-15 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100103

Bug ID: 100103
   Summary: Automatic reallocation fails inside select rank
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50606
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50606=edit
Fortran code showing problem

Hi All!

Automatic reallocation on intrinsic assignment fails inside select rank
construct.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100098] New: Polymorphic pointers and allocatables have incorrect rank

2021-04-15 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100098

Bug ID: 100098
   Summary: Polymorphic pointers and allocatables have incorrect
rank
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50601
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50601=edit
Fortran code showing problem

Hi All!

Rank information is not correctly written into the pointer and allocatable
polymorphic object descriptors.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100097] New: Unlimited polymorphic pointers and allocatables have incorrect rank

2021-04-15 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100097

Bug ID: 100097
   Summary: Unlimited polymorphic pointers and allocatables have
incorrect rank
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50600
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50600=edit
Fortran code showing problem

Hi All!

Rank information is not correctly written into the pointer and allocatable
unlimited polymorphic descriptors.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100094] New: Undefined pointers have incorrect rank when using optimization

2021-04-15 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100094

Bug ID: 100094
   Summary: Undefined pointers have incorrect rank when using
optimization
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50599
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50599=edit
Fortran code showing problem

Hi All!

Rank information is not correctly written into the pointer descriptor when
using optimization or -ffpe-trap.

Seen on:

GNU Fortran (GCC) 11.0.1 20210415 (experimental)
GNU Fortran (GCC) 10.3.1 20210415

Thank you very much.

Best regards,
José Rui

[Bug fortran/100040] New: Wrong code with intent out assumed-rank allocatable

2021-04-11 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100040

Bug ID: 100040
   Summary: Wrong code with intent out assumed-rank allocatable
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50562
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50562=edit
Fortran code showing problem

Hi All!

With intent out assumed-rank allocatable argument the generated code is missing
is missing the descriptor copy out.

Seen in:

GNU Fortran (GCC) 11.0.1 20210411 (experimental)
GNU Fortran (GCC) 10.3.1 20210411

Thank you very much.

Best regards,
José Rui

[Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument

2021-04-11 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100029

Bug ID: 100029
   Summary: ICE on subroutine call with allocatable polymorphic
assumed-rank argument
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50556
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50556=edit
Fortran code showing problem

Hi All!

ICE on subroutine call when passing an allocatable polymorphic assumed-rank
intent-out argument.

Seen in:

GNU Fortran (GCC) 11.0.1 20210411 (experimental)
GNU Fortran (GCC) 10.3.1 20210411
GNU Fortran (GCC) 9.3.1 20210411

Thank you very much.

Best regards.
José Rui

[Bug fortran/84006] [8/9/10/11 Regression] ICE in storage_size() with CLASS entity

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84006

José Rui Faustino de Sousa  changed:

   What|Removed |Added

 CC||jrfsousa at gmail dot com

--- Comment #8 from José Rui Faustino de Sousa  ---
Patch posted

https://gcc.gnu.org/pipermail/fortran/2021-April/055922.html

[Bug fortran/100027] ICE on storage_size with polymorphic argument

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted

https://gcc.gnu.org/pipermail/fortran/2021-April/055922.html

[Bug fortran/100025] ICE on subroutine missing explicit interface

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100025

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055921.html

[Bug fortran/100024] ICE on subroutine missing explicit interface

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100024

--- Comment #1 from José Rui Faustino de Sousa  ---
Patch posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055921.html

[Bug fortran/100027] New: ICE on storage_size with polymorphic argument

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027

Bug ID: 100027
   Summary: ICE on storage_size with polymorphic argument
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50554
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50554=edit
Fortran code showing problem

Hi All!

ICE on storage_size with pointer (or allocatable) array argument.

Tested on:

GNU Fortran (GCC) 11.0.1 20210410 (experimental)
GNU Fortran (GCC) 10.3.1 20210410
GNU Fortran (GCC) 9.3.1 20210410

Thank you very much.

Best regards,
José Rui

[Bug fortran/100025] New: ICE on subroutine missing explicit interface

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100025

Bug ID: 100025
   Summary: ICE on subroutine missing explicit interface
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50552
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50552=edit
Fortran code showing problem

Hi All!

ICE on assumed-rank subroutine call with missing explicit interface.

Tested on:

GNU Fortran (GCC) 11.0.1 20210410 (experimental)
GNU Fortran (GCC) 10.3.1 20210410

Does not ICE on:

GNU Fortran (GCC) 9.3.1 20210410

Thank you very much.

Best regards,
José Rui

[Bug fortran/100024] New: ICE on subroutine missing explicit interface

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100024

Bug ID: 100024
   Summary: ICE on subroutine missing explicit interface
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50551
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50551=edit
Fortran code showing problem

Hi All!

ICE on assumed-rank subroutine call with missing explicit interface.

Tested on:

GNU Fortran (GCC) 11.0.1 20210410 (experimental)
GNU Fortran (GCC) 10.3.1 20210410

Does not ICE on:

GNU Fortran (GCC) 9.3.1 20210410

Thank you very much.

Best regards,
José Rui

[Bug fortran/100018] ICE on missing polymorphic argument

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100018

--- Comment #1 from José Rui Faustino de Sousa  ---
Path posted:

https://gcc.gnu.org/pipermail/fortran/2021-April/055916.html

[Bug fortran/100018] New: ICE on missing polymorphic argument

2021-04-10 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100018

Bug ID: 100018
   Summary: ICE on missing polymorphic argument
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Hi All!

ICE with simple subroutine missing a dummy argument.

subroutine foo(that)
  implicit none
  class(*),  target, intent(in)  :: this
  class(*), pointer, intent(out) :: that

  that => this
  return
end subroutine foo

Tested on:

GNU Fortran (GCC) 11.0.1 20210410 (experimental)
GNU Fortran (GCC) 10.3.1 20210410
GNU Fortran (GCC) 9.3.1 20210410

Thank you very much.

Best regards,
José Rui

[Bug fortran/91726] [8/9 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3612

2021-04-01 Thread jrfsousa at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91726

--- Comment #9 from José Rui Faustino de Sousa  ---
Hi Paul!

This seems to fix the ICE generated by using -ftrapv -fcheck=bounds

Fixes "nelems" type and adds an optional assert to make sure it stays fixed.

Best regards,
José Rui


diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index be5eb89350f..7954b138605 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -9375,7 +9375,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
nelems));
}
  else
-   nelems = build_int_cst (size_type_node, 1);
+   nelems = build_int_cst (gfc_array_index_type, 1);

  if (CLASS_DATA (c)->attr.dimension
  || CLASS_DATA (c)->attr.codimension)

diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 2fa17b36c03..258e885faaa 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1446,6 +1452,7 @@ gfc_copy_class_to_class (tree from, tree to, tree nelems,
bool unlimited)
name = (const char *)(DECL_NAME (to)->identifier.id.str);

  from_len = gfc_conv_descriptor_size (from_data, 1);
+ gcc_assert (TREE_TYPE (orig_nelems) == gfc_array_index_type);
  tmp = fold_build2_loc (input_location, NE_EXPR,
  logical_type_node, from_len, orig_nelems);
  msg = xasprintf ("Array bound mismatch for dimension %d "