Patchwork [fortran] : Fix PR 48926, gfortran.dg/coarray/image_index_1.f90 -fcoarray=single -O2 (test for excess errors)

login
register
mail settings
Submitter Uros Bizjak
Date July 9, 2011, 5:34 p.m.
Message ID <CAFULd4acTKgOU0oX9YeKR4rsSDz=vcGwwLqfMY9RNyPRYad1Fw@mail.gmail.com>
Download mbox | patch
Permalink /patch/104012/
State New
Headers show

Comments

Uros Bizjak - July 9, 2011, 5:34 p.m.
Hello!

gfc_get_corank returns integer value, not bool.  This problem was
triggered by --enable-build-with-cxx configured build.

2011-07-09  Uros Bizjak  <ubizjak@gmail.com>

	PR fortran/48926
	* expr.c (gfc_get_corank): Change return value to int.
	* gfortran.h (gfc_get_corank): Update function prototype.

Patch was regression tested on x86_64-pc-linux-gnu {,-m32} with
--enable-build-with-cxx.

Approved by Tobias Burnus in the PR. Patch was committed to mainline,
will be committed to 4.6 branch soon.

Uros.

Patch

Index: expr.c
===================================================================
--- expr.c	(revision 176083)
+++ expr.c	(working copy)
@@ -4143,7 +4143,7 @@ 
 }
 
 
-bool
+int
 gfc_get_corank (gfc_expr *e)
 {
   int corank;
Index: gfortran.h
===================================================================
--- gfortran.h	(revision 176083)
+++ gfortran.h	(working copy)
@@ -2734,7 +2734,7 @@ 
 bool gfc_is_proc_ptr_comp (gfc_expr *, gfc_component **);
 
 bool gfc_is_coindexed (gfc_expr *);
-bool gfc_get_corank (gfc_expr *);
+int gfc_get_corank (gfc_expr *);
 bool gfc_has_ultimate_allocatable (gfc_expr *);
 bool gfc_has_ultimate_pointer (gfc_expr *);