public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk
@ 2014-04-27 19:50 Tobias Burnus
  2014-04-30  8:29 ` Paul Richard Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Burnus @ 2014-04-27 19:50 UTC (permalink / raw)
  To: gcc-patches, gfortran

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

First, I would be really delighted if someone could review my coarray 
patches for the trunk as it makes simpler to develop patches on top of it:
* http://gcc.gnu.org/ml/fortran/2014-04/msg00087.html
* http://gcc.gnu.org/ml/fortran/2014-04/msg00091.html
* http://gcc.gnu.org/ml/fortran/2014-04/msg00092.html

Secondly, attached is a patch which fixes an ICE - and prepares for some 
additional class-related coarray patches. In particular, the patch 
ensures that for nonallocatable *polymorphic* coarrays, the coarray 
token and offset are passed.

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias

PS: There is still something wrong (for both -fcoarray=single and 
-fcoarray=lib) with lcobound/ucobounds and polymorphic coarrays and with 
using them with select type and associated. That's something I would 
like to tackle next. If that's done, I probably should really 
concentrate on reviewing a few patches and doing some other bug fixes 
before continue working on coarrays.

[-- Attachment #2: caf-poly2.diff --]
[-- Type: text/x-patch, Size: 9240 bytes --]

2014-04-27  Tobias Burnus  <burnus@net-b.de>

	* trans-decl.c (create_function_arglist): Add hidden coarray arguments
	also for polymorphic coarrays.
	* trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
	also for polymorphic coarrays.

2014-04-27  Tobias Burnus  <burnus@net-b.de>

	* gfortran.dg/coarray_poly_7.f90
	* gfortran.dg/coarray_poly_8.f90
	* gfortran.dg/coarray_poly_9.f90

diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index c835a3b..ee6c7e3 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -2234,9 +2234,12 @@ create_function_arglist (gfc_symbol * sym)
 
       /* Coarrays which are descriptorless or assumed-shape pass with
 	 -fcoarray=lib the token and the offset as hidden arguments.  */
-      if (f->sym->attr.codimension
-	  && gfc_option.coarray == GFC_FCOARRAY_LIB
-	  && !f->sym->attr.allocatable)
+      if (gfc_option.coarray == GFC_FCOARRAY_LIB
+	  && ((f->sym->ts.type != BT_CLASS && f->sym->attr.codimension
+	       && !f->sym->attr.allocatable)
+	      || (f->sym->ts.type == BT_CLASS
+		  && CLASS_DATA (f->sym)->attr.codimension
+		  && !CLASS_DATA (f->sym)->attr.allocatable)))
 	{
 	  tree caf_type;
 	  tree token;
@@ -2244,13 +2247,18 @@ create_function_arglist (gfc_symbol * sym)
 
 	  gcc_assert (f->sym->backend_decl != NULL_TREE
 		      && !sym->attr.is_bind_c);
-	  caf_type = TREE_TYPE (f->sym->backend_decl);
+	  caf_type = f->sym->ts.type == BT_CLASS
+		     ? TREE_TYPE (CLASS_DATA (f->sym)->backend_decl)
+		     : TREE_TYPE (f->sym->backend_decl);
 
 	  token = build_decl (input_location, PARM_DECL,
 			      create_tmp_var_name ("caf_token"),
 			      build_qualified_type (pvoid_type_node,
 						    TYPE_QUAL_RESTRICT));
-	  if (f->sym->as->type == AS_ASSUMED_SHAPE)
+	  if ((f->sym->ts.type != BT_CLASS
+	       && f->sym->as->type != AS_DEFERRED)
+	      || (f->sym->ts.type == BT_CLASS
+		  && CLASS_DATA (f->sym)->as->type != AS_DEFERRED))
 	    {
 	      gcc_assert (DECL_LANG_SPECIFIC (f->sym->backend_decl) == NULL
 			  || GFC_DECL_TOKEN (f->sym->backend_decl) == NULL_TREE);
@@ -2275,7 +2283,10 @@ create_function_arglist (gfc_symbol * sym)
 			       create_tmp_var_name ("caf_offset"),
 			       gfc_array_index_type);
 
-	  if (f->sym->as->type == AS_ASSUMED_SHAPE)
+	  if ((f->sym->ts.type != BT_CLASS
+	       && f->sym->as->type != AS_DEFERRED)
+	      || (f->sym->ts.type == BT_CLASS
+		  && CLASS_DATA (f->sym)->as->type != AS_DEFERRED))
 	    {
 	      gcc_assert (GFC_DECL_CAF_OFFSET (f->sym->backend_decl)
 					       == NULL_TREE);
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index f0e5b7d..6b93537 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -4783,19 +4783,24 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
 
       /* For descriptorless coarrays and assumed-shape coarray dummies, we
 	 pass the token and the offset as additional arguments.  */
-      if (fsym && fsym->attr.codimension
-	  && gfc_option.coarray == GFC_FCOARRAY_LIB
-	  && !fsym->attr.allocatable
-	  && e == NULL)
+      if (fsym && e == NULL && gfc_option.coarray == GFC_FCOARRAY_LIB
+	  && ((fsym->ts.type != BT_CLASS && fsym->attr.codimension
+	       && !fsym->attr.allocatable)
+	      || (fsym->ts.type == BT_CLASS
+		  && CLASS_DATA (fsym)->attr.codimension
+		  && !CLASS_DATA (fsym)->attr.allocatable)))
 	{
 	  /* Token and offset. */
 	  vec_safe_push (stringargs, null_pointer_node);
 	  vec_safe_push (stringargs, build_int_cst (gfc_array_index_type, 0));
 	  gcc_assert (fsym->attr.optional);
 	}
-      else if (fsym && fsym->attr.codimension
-	       && !fsym->attr.allocatable
-	       && gfc_option.coarray == GFC_FCOARRAY_LIB)
+      else if (fsym && gfc_option.coarray == GFC_FCOARRAY_LIB
+	       && ((fsym->ts.type != BT_CLASS && fsym->attr.codimension
+		    && !fsym->attr.allocatable)
+		   || (fsym->ts.type == BT_CLASS
+		       && CLASS_DATA (fsym)->attr.codimension
+		       && !CLASS_DATA (fsym)->attr.allocatable)))
 	{
 	  tree caf_decl, caf_type;
 	  tree offset, tmp2;
@@ -4837,22 +4842,30 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
 	      tmp = caf_decl;
 	    }
 
-          if (fsym->as->type == AS_ASSUMED_SHAPE
-	      || (fsym->as->type == AS_ASSUMED_RANK && !fsym->attr.pointer
-		  && !fsym->attr.allocatable))
+          tmp2 = fsym->ts.type == BT_CLASS
+		 ? gfc_class_data_get (parmse.expr) : parmse.expr;
+          if ((fsym->ts.type != BT_CLASS
+	       && (fsym->as->type == AS_ASSUMED_SHAPE
+		   || fsym->as->type == AS_ASSUMED_RANK))
+	      || (fsym->ts.type == BT_CLASS
+		  && (CLASS_DATA (fsym)->as->type == AS_ASSUMED_SHAPE
+		      || CLASS_DATA (fsym)->as->type == AS_ASSUMED_RANK)))
 	    {
-	      gcc_assert (POINTER_TYPE_P (TREE_TYPE (parmse.expr)));
-	      gcc_assert (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE
-						   (TREE_TYPE (parmse.expr))));
-	      tmp2 = build_fold_indirect_ref_loc (input_location, parmse.expr);
+	      if (fsym->ts.type == BT_CLASS)
+		gcc_assert (!POINTER_TYPE_P (TREE_TYPE (tmp2)));
+	      else
+		{
+		  gcc_assert (POINTER_TYPE_P (TREE_TYPE (tmp2)));
+		  tmp2 = build_fold_indirect_ref_loc (input_location, tmp2);
+		}
+	      gcc_assert (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp2)));
 	      tmp2 = gfc_conv_descriptor_data_get (tmp2);
 	    }
-	  else if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (parmse.expr)))
-	    tmp2 = gfc_conv_descriptor_data_get (parmse.expr);
+	  else if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp2)))
+	    tmp2 = gfc_conv_descriptor_data_get (tmp2);
 	  else
 	    {
-	      gcc_assert (POINTER_TYPE_P (TREE_TYPE (parmse.expr)));
-	      tmp2 = parmse.expr;
+	      gcc_assert (POINTER_TYPE_P (TREE_TYPE (tmp2)));
 	    }
 
 	  tmp = fold_build2_loc (input_location, MINUS_EXPR,
--- /dev/null	2014-04-23 17:58:54.386702372 +0200
+++ gcc/gcc/testsuite/gfortran.dg/coarray_poly_6.f90	2014-04-27 20:32:43.452474762 +0200
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdump-tree-original" }
+!
+  implicit none
+  type t
+  end type t
+  class(t), allocatable :: y[:]
+  call bar()
+  call foo(y)
+contains
+  subroutine bar(x)
+    class(t), optional :: x[*]
+  end subroutine bar
+  subroutine foo(x)
+    class(t) :: x[*]
+  end subroutine foo
+end
+! { dg-final { scan-tree-dump-times "foo \\(struct __class_MAIN___T_0_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(struct __class_MAIN___T_0_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(0B, 0B, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
--- /dev/null	2014-04-23 17:58:54.386702372 +0200
+++ gcc/gcc/testsuite/gfortran.dg/coarray_poly_7.f90	2014-04-27 20:33:37.856904369 +0200
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdump-tree-original" }
+!
+  implicit none
+  type t
+  end type t
+  class(t), allocatable :: y(:)[:]
+  call bar()
+  call foo(y)
+contains
+  subroutine bar(x)
+    class(t), optional :: x(:)[*]
+  end subroutine bar
+  subroutine foo(x)
+    class(t) :: x(:)[*]
+  end subroutine foo
+end
+! { dg-final { scan-tree-dump-times "foo \\(struct __class_MAIN___T_1_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(struct __class_MAIN___T_1_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(0B, 0B, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
--- /dev/null	2014-04-23 17:58:54.386702372 +0200
+++ gcc/gcc/testsuite/gfortran.dg/coarray_poly_8.f90	2014-04-27 20:33:46.073969253 +0200
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdump-tree-original" }
+!
+  implicit none
+  type t
+  end type t
+  class(t), allocatable :: y(:)[:]
+  call bar()
+  call foo(y)
+contains
+  subroutine bar(x)
+    class(t), optional :: x(2)[*]
+  end subroutine bar
+  subroutine foo(x)
+    class(t) :: x(2)[*]
+  end subroutine foo
+end
+! { dg-final { scan-tree-dump-times "foo \\(struct __class_MAIN___T_1_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(struct __class_MAIN___T_1_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(0B, 0B, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }

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

* Re: [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk
  2014-04-27 19:50 [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk Tobias Burnus
@ 2014-04-30  8:29 ` Paul Richard Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Richard Thomas @ 2014-04-30  8:29 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: gcc-patches, gfortran

Dear Tobias,

On 27 April 2014 20:56, Tobias Burnus <burnus@net-b.de> wrote:
> First, I would be really delighted if someone could review my coarray
> patches for the trunk as it makes simpler to develop patches on top of it:
> * http://gcc.gnu.org/ml/fortran/2014-04/msg00087.html

This is OK for trunk.

> * http://gcc.gnu.org/ml/fortran/2014-04/msg00091.html

"dg2final" ???? Surely this is a typo?  Although I note that getting
it wrong on a German keyboard should produce a 4. Therefore it might
well be a command that i do not know about.

Otherwise, OK for trunk.

> * http://gcc.gnu.org/ml/fortran/2014-04/msg00092.html
>

This is OK for trunk

> Secondly, attached is a patch which fixes an ICE - and prepares for some
> additional class-related coarray patches. In particular, the patch ensures
> that for nonallocatable *polymorphic* coarrays, the coarray token and offset
> are passed.

This is also OK for trunk.
>
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
>
> Tobias
>
> PS: There is still something wrong (for both -fcoarray=single and
> -fcoarray=lib) with lcobound/ucobounds and polymorphic coarrays and with
> using them with select type and associated. That's something I would like to
> tackle next. If that's done, I probably should really concentrate on
> reviewing a few patches and doing some other bug fixes before continue
> working on coarrays.

Thank you truly for the effort that you are putting into co-arrays.
It is highly gratifying that gfortran seems to perform so well
compared with another product.  Frankly, if I were you I would
continue working on co-arrays, whilst you have the wind in your sails
:-)

Best regards

Paul



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy

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

* Re: [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk
@ 2014-05-02 12:04 Tobias Burnus
  0 siblings, 0 replies; 5+ messages in thread
From: Tobias Burnus @ 2014-05-02 12:04 UTC (permalink / raw)
  To: Dominique Dhumieres, gcc-patches, fortran

Dominique Dhumieres wrote:
> This causes several failures with -m32 (see
> http://gcc.gnu.org/ml/gcc-regression/2014-05/msg00003.html):

Sorry for the breakage - obviously, I forgot to test with -m32.

> Most of the failures are fixed by replacing 'kind=8' with 'kind=.' or 'kind=\[48\]'.

Either change is fine with me.

> The remaining failures in gfortran.dg/coarray_lib_this_image_*.f90 are fixed by
> the following patches

The patch is okay with a proper ChangeLog; please also list "PR fortran/61025".

Thanks,

Tobias

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

* Re: [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk
@ 2014-05-01  8:50 Dominique Dhumieres
  0 siblings, 0 replies; 5+ messages in thread
From: Dominique Dhumieres @ 2014-05-01  8:50 UTC (permalink / raw)
  To: fortran; +Cc: gcc-patches, paul.richard.thomas, burnus

This causes several failures with -m32 (see
http://gcc.gnu.org/ml/gcc-regression/2014-05/msg00003.html):

FAIL: gfortran.dg/coarray_lib_this_image_1.f90  -O   scan-tree-dump-times original "bar \\(real\\(kind=4\\)\\[2\\] \\* restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_lib_this_image_1.f90  -O   scan-tree-dump-times original "myucobound = \\(integer\\(kind=4\\)\\) \\(\\(\\(unsigned int\\) parm...dim\\[1\\].lbound \\+ \\(unsigned int\\) _gfortran_caf_num_images \\(0, -1\\)\\) \\+ 4294967295\\);" 1
FAIL: gfortran.dg/coarray_lib_this_image_2.f90  -O   scan-tree-dump-times original "bar \\(&parm.[0-9]+, caf_token.[0-9]+, \\(integer\\(kind=8\\)\\) parm.[0-9]+.data - \\(integer\\(kind=8\\)\\) x\\);" 1
FAIL: gfortran.dg/coarray_lib_this_image_2.f90  -O   scan-tree-dump-times original "bar \\(struct array1_real\\(kind=4\\) & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_lib_this_image_2.f90  -O   scan-tree-dump-times original "mylbound = parm...dim\\[0\\].stride >= 0 && parm...dim\\[0\\].ubound >= parm...dim\\[0\\].lbound \\|\\| parm...dim\\[0\\].stride < 0 \\? \\(integer\\(kind=4\\)\\) parm...dim\\[0\\].lbound : 1;" 1
FAIL: gfortran.dg/coarray_lib_this_image_2.f90  -O   scan-tree-dump-times original "myucobound = \\(integer\\(kind=4\\)\\) \\(\\(\\(unsigned int\\) parm...dim\\[1\\].lbound \\+ \\(unsigned int\\) _gfortran_caf_num_images \\(0, -1\\)\\) \\+ 4294967295\\);" 1
FAIL: gfortran.dg/coarray_poly_6.f90  -O   scan-tree-dump-times original "bar \\(struct __class_MAIN___T_0_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_poly_6.f90  -O   scan-tree-dump-times original "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1
FAIL: gfortran.dg/coarray_poly_6.f90  -O   scan-tree-dump-times original "foo \\(struct __class_MAIN___T_0_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_poly_7.f90  -O   scan-tree-dump-times original "bar \\(struct __class_MAIN___T_1_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_poly_7.f90  -O   scan-tree-dump-times original "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1
FAIL: gfortran.dg/coarray_poly_7.f90  -O   scan-tree-dump-times original "foo \\(struct __class_MAIN___T_1_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_poly_8.f90  -O   scan-tree-dump-times original "bar \\(struct __class_MAIN___T_1_1t \\* x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1
FAIL: gfortran.dg/coarray_poly_8.f90  -O   scan-tree-dump-times original "foo \\(&class.., y._data._data.token, \\(integer\\(kind=8\\)\\) class..._data.data - \\(integer\\(kind=8\\)\\) y._data._data.data\\);" 1
FAIL: gfortran.dg/coarray_poly_8.f90  -O   scan-tree-dump-times original "foo \\(struct __class_MAIN___T_1_1t & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1

Most of the failures are fixed by replacing 'kind=8' with 'kind=.' or 'kind=\[48\]'.

The remaining failures in gfortran.dg/coarray_lib_this_image_*.f90 are fixed by
the following patches

--- ../_clean/gcc/testsuite/gfortran.dg/coarray_lib_this_image_1.f90    2014-04-30 21:41:33.000000000 +0200
+++ gcc/testsuite/gfortran.dg/coarray_lib_this_image_1.f90      2014-05-01 10:37:26.000000000 +0200
@@ -16,10 +16,10 @@ contains
   end subroutine bar
 end

-! { dg-final { scan-tree-dump-times "bar \\(real\\(kind=4\\)\\\[2\\\] \\* restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(real\\(kind=4\\)\\\[2\\\] \\* restrict x, void \\* restrict caf_token.., integer\\(kind=\[48\]\\) caf_offset..\\)" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "mylcobound = 5;" 1 "original" } }
-! { dg.final { scan-tree-dump-times "parm...dim\\\[1\\\].lbound = 5;" 1 "original" } }
-! { dg-final { scan-tree-dump-times "myucobound = \\(integer\\(kind=4\\)\\) \\(\\(\\(unsigned int\\) parm...dim\\\[1\\\].lbound \\+ \\(unsigned int\\) _gfortran_caf_num_images \\(0, -1\\)\\) \\+ 4294967295\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "parm...dim\\\[1\\\].lbound = 5;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "myucobound =\[^\n\r\]* parm...dim\\\[1\\\].lbound \\+ \[^\n\r]*_gfortran_caf_num_images \\(0, -1\\).? \\+ -?\[0-9\]+\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "mylbound = 1;" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "mythis_image = _gfortran_caf_this_image \\(0\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "bar \\(x, caf_token.., 0\\);" 1 "original" } }
--- ../_clean/gcc/testsuite/gfortran.dg/coarray_lib_this_image_2.f90    2014-04-30 21:41:32.000000000 +0200
+++ gcc/testsuite/gfortran.dg/coarray_lib_this_image_2.f90      2014-05-01 10:33:28.000000000 +0200
@@ -16,12 +16,12 @@ contains
   end subroutine bar
 end

-! { dg-final { scan-tree-dump-times "bar \\(struct array1_real\\(kind=4\\) & restrict x, void \\* restrict caf_token.., integer\\(kind=8\\) caf_offset..\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(struct array1_real\\(kind=4\\) & restrict x, void \\* restrict caf_token.., integer\\(kind=\[48\]\\) caf_offset..\\)" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "mylcobound = 5;" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "parm...dim\\\[1\\\].lbound = 5;" 1 "original" } }
-! { dg-final { scan-tree-dump-times "myucobound = \\(integer\\(kind=4\\)\\) \\(\\(\\(unsigned int\\) parm...dim\\\[1\\\].lbound \\+ \\(unsigned int\\) _gfortran_caf_num_images \\(0, -1\\)\\) \\+ 4294967295\\);" 1 "original" } }
-! { dg-final { scan-tree-dump-times "mylbound = parm...dim\\\[0\\\].stride >= 0 && parm...dim\\\[0\\\].ubound >= parm...dim\\\[0\\\].lbound \\|\\| parm...dim\\\[0\\\].stride < 0 \\? \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound : 1;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "myucobound =\[^\n\r\]* parm...dim\\\[1\\\].lbound \\+ \[^\n\r\]*_gfortran_caf_num_images \\(0, -1\\).? \\+ -?\[0-9\]+\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "mylbound = parm...dim\\\[0\\\].stride >= 0 && parm...dim\\\[0\\\].ubound >= parm...dim\\\[0\\\].lbound \\|\\| parm...dim\\\[0\\\].stride < 0 \\?\[^\n\r\]* parm...dim\\\[0\\\].lbound : 1;" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "mythis_image = _gfortran_caf_this_image \\(0\\);" 1 "original" } }
-! { dg-final { scan-tree-dump-times "bar \\(&parm.\[0-9\]+, caf_token.\[0-9\]+, \\(integer\\(kind=8\\)\\) parm.\[0-9\]+.data - \\(integer\\(kind=8\\)\\) x\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "bar \\(&parm.\[0-9\]+, caf_token.\[0-9\]+, \\(integer\\(kind=\[48\]\\)\\) parm.\[0-9\]+.data - \\(integer\\(kind=\[48\]\\)\\) x\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "_gfortran_caf_init \\(&argc, &argv\\);" 1 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }

Dominique

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

* Re: [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk
@ 2014-04-30 10:18 Dominique Dhumieres
  0 siblings, 0 replies; 5+ messages in thread
From: Dominique Dhumieres @ 2014-04-30 10:18 UTC (permalink / raw)
  To: fortran; +Cc: gcc-patches, paul.richard.thomas, burnus


> > * http://gcc.gnu.org/ml/fortran/2014-04/msg00091.html
>
> "dg2final" ???? Surely this is a typo? ...

I also see dg1final and dg.final.

Dominique

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

end of thread, other threads:[~2014-05-02 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-27 19:50 [Patch, Fortran] Fix an issue with CLASS and -fcoarray=lib on the trunk Tobias Burnus
2014-04-30  8:29 ` Paul Richard Thomas
2014-04-30 10:18 Dominique Dhumieres
2014-05-01  8:50 Dominique Dhumieres
2014-05-02 12:04 Tobias Burnus

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