From: Steven G. Kargl Date: Tue, 20 Oct 2015 00:31:48 +0000 (+0000) Subject: resolve.c (gfc_verify_binding_labels): Check for NULL pointer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6969536a04af6c7c605773a92fce47a7ce115dd;p=gcc.git resolve.c (gfc_verify_binding_labels): Check for NULL pointer. 2015-10-19 Steven G. Kargl * resolve.c (gfc_verify_binding_labels): Check for NULL pointer. 2015-10-19 Steven G. Kargl * gfortran.dg/pr67900.f90: New tests. From-SVN: r229013 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0b94ad70658..44c60faa2b4 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2015-10-19 Steven G. Kargl + + * resolve.c (gfc_verify_binding_labels): Check for NULL pointer. + 2015-10-19 Steven G. Kargl PR fortran/68019 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 491507b0cee..8798d4d9e96 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -10800,7 +10800,7 @@ gfc_verify_binding_labels (gfc_symbol *sym) sym->binding_label = NULL; } - else if (sym->attr.flavor == FL_VARIABLE + else if (sym->attr.flavor == FL_VARIABLE && module && (strcmp (module, gsym->mod_name) != 0 || strcmp (sym->name, gsym->sym_name) != 0)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a32885249a..51fb89574d7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-10-19 Steven G. Kargl + + * gfortran.dg/pr67900.f90: New tests. + 2015-10-19 Pierre-Marie de Rodat * gnat.dg/opt50.adb: New test. diff --git a/gcc/testsuite/gfortran.dg/pr67900.f90 b/gcc/testsuite/gfortran.dg/pr67900.f90 new file mode 100644 index 00000000000..c077fbcfd89 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr67900.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! PR fortran/67900 +! Original code contributed by Giorgian Borca-Tasciuc +! giorgianb at gmail dot com +! +program main + implicit none + interface f + function f_real(x) + real, bind(c) :: x + real :: f_real + end function f_real + + function f_integer(x) + integer, bind(c) :: x + integer :: f_integer + end function f_integer + end interface f +end program main