From 82711f6567ef069eebb942e382e2c3fa61fbf538 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 1 Aug 2024 14:23:42 +0000 Subject: automatic import of compat-libgfortran-48 --- gcc48-rh1369183.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 gcc48-rh1369183.patch (limited to 'gcc48-rh1369183.patch') diff --git a/gcc48-rh1369183.patch b/gcc48-rh1369183.patch new file mode 100644 index 0000000..7127d15 --- /dev/null +++ b/gcc48-rh1369183.patch @@ -0,0 +1,52 @@ +2017-03-07 Jakub Jelinek + + Partial backport + 2016-05-07 Fritz Reese + + PR fortran/56226 + * interface.c (gfc_compare_derived_types): Don't ICE if the + derived type or both types have no components. + + * gfortran.dg/rh1369183.f90: New test. + +--- gcc/fortran/interface.c.jj 2015-06-18 16:32:45.000000000 +0200 ++++ gcc/fortran/interface.c 2017-03-07 18:35:38.982302826 +0100 +@@ -418,6 +418,13 @@ gfc_compare_derived_types (gfc_symbol *d + && !(derived1->attr.is_bind_c && derived2->attr.is_bind_c)) + return 0; + ++ /* Protect against null components. */ ++ if (derived1->attr.zero_comp != derived2->attr.zero_comp) ++ return 0; ++ ++ if (derived1->attr.zero_comp) ++ return 1; ++ + dt1 = derived1->components; + dt2 = derived2->components; + +--- gcc/testsuite/gfortran.dg/rh1369183.f90.jj 2017-03-07 18:37:39.574775432 +0100 ++++ gcc/testsuite/gfortran.dg/rh1369183.f90 2017-03-07 18:38:38.423993194 +0100 +@@ -0,0 +1,22 @@ ++! { dg-do compile } ++ ++module mod1369183 ++ implicit none ++ contains ++ subroutine sub(test) ++ type test_t ++ sequence ++ integer(4) type ++ end type test_t ++ type(test_t),intent(inout) :: test ++ end subroutine sub ++end module mod1369183 ++subroutine rh1369183 ++ use mod1369183 ++ implicit none ++ type test_t ++ sequence ++ end type test_t ++ type(test_t) :: tst ++ call sub(tst) ! { dg-error "Type mismatch in argument" } ++end subroutine rh1369183 -- cgit v1.2.3