This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR29396 PR29606 PR30625 and PR30871 - subreference array pointers.


Tobias,

Thanks for taking a look - Thomas, have you done likewise?
I looked at the patch plus at the following, which I extracted from your
follow up:
  http://gcc.gnu.org/ml/fortran/2007-09/msg00175.html

As the diff looks quite different, I'm not 100% sure that I got it right.
The subsequent patch went much further, as a visit to gcc-cvs will confirm.


Looking at all the failures I got, I'm almost positive that I have not got it right. :-(
I committed the patch for the regression this morning.

Now to the patch:


@@ -206,7 +206,9 @@ gfc_get_expr_charlen (gfc_expr *e)
        default:
          /* We should never got substring references here.  These will be
             broken down by the scalarizer.  */
-         gcc_unreachable ();
+         if (is_subref_array (e))
+           length = e->symtree->n.sym->ts.cl->backend_decl;
+         break;


Shouldn't one update the comment?
Yes indeed. Thanks.

@@ -321,7 +323,28 @@ gfc_build_array_ref (tree base, tree off + if (decl && (TREE_CODE (decl) == FIELD_DECL + || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == PARM_DECL)

The indenting looks wrong.
I'll take a look :-)

Otherwise, the patch seems to be ok. (It would great if someone else would also review the patch!)
Thanks for your input.

Note: I still get a ICE with the test case from PR29606:
Oh bother - I'll check that too.

gfortran.dg/alloc_comp_constructor_1.f90:102: internal compiler error: Segmentation fault ==31732== Invalid read of size 8 ==31732== at 0x49C380: gfc_trans_assignment (trans-expr.c:3824) ==31732== by 0x47FE80: gfc_trans_code (trans.c:993) ==31732== by 0x494E42: gfc_generate_function_code (trans-decl.c:3277)

gfortran.dg/allocatable_dummy_1.f90:28: internal compiler error: Segmentation fault
==31752== Invalid read of size 8
==31752==    at 0x49C380: gfc_trans_assignment (trans-expr.c:3824)
==31752==    by 0x47FE80: gfc_trans_code (trans.c:993)
==31752==    by 0x494E42: gfc_generate_function_code (trans-decl.c:3277)

etc.
I saw none of that - I think that something bad has happened with your trying to apply the secondary patch. Note that this latter has nothing to do with subref array pointers and is a regression due to the patch that uses memcpy in assignments, where possible.

Thanks

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]