aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/check.c
diff options
context:
space:
mode:
authorSeth Johnson <johnsonsr@ornl.gov>2018-03-25 11:30:24 +0000
committerDominique d'Humieres <dominiq@gcc.gnu.org>2018-03-25 13:30:24 +0200
commita2b471e494bf3942e35336227a846e332232d88c (patch)
treee5a533858deb6dbe102dd31881e67e07a06e070c /gcc/fortran/check.c
parent60ac5d9dd93ea7d95f69d9082eba0ed0d1a1baf0 (diff)
downloadgcc-a2b471e494bf3942e35336227a846e332232d88c.zip
gcc-a2b471e494bf3942e35336227a846e332232d88c.tar.gz
gcc-a2b471e494bf3942e35336227a846e332232d88c.tar.bz2
re PR fortran/84924 (Erroneous error in C_F_POINTER)
2018-03-25 Seth Johnson <johnsonsr@ornl.gov> Dominique d'Humieres <dominiq@gcc.gnu.org> PR fortran/84924 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable scalar derived type with -std=f2003 and -std=f2008. 2018-03-25 Seth Johnson <johnsonsr@ornl.gov> Dominique d'Humieres <dominiq@gcc.gnu.org> PR fortran/84924 * gfortran.dg/scalar_pointer_1.f90: New test. Co-Authored-By: Dominique d'Humieres <dominiq@gcc.gnu.org> From-SVN: r258843
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r--gcc/fortran/check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 23b1964..83bd004 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -4749,7 +4749,7 @@ gfc_check_c_f_pointer (gfc_expr *cptr, gfc_expr *fptr, gfc_expr *shape)
return false;
}
- if (!is_c_interoperable (fptr, &msg, false, true))
+ if (fptr->rank > 0 && !is_c_interoperable (fptr, &msg, false, true))
return gfc_notify_std (GFC_STD_F2008_TS, "Noninteroperable array FPTR "
"at %L to C_F_POINTER: %s", &fptr->where, msg);