]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/55959 ([OOP] ICE in in gfc_simplify_expr, at fortran/expr.c:1920)
authorJanus Weil <janus@gcc.gnu.org>
Sat, 13 Apr 2013 10:52:31 +0000 (12:52 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Sat, 13 Apr 2013 10:52:31 +0000 (12:52 +0200)
2013-04-13  Janus Weil  <janus@gcc.gnu.org>

PR fortran/55959
* expr.c (gfc_simplify_expr): Branch is not unreachable.

2013-04-13  Janus Weil  <janus@gcc.gnu.org>

PR fortran/55959
* gfortran.dg/typebound_proc_29.f03: New.

From-SVN: r197943

gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/typebound_proc_29.f90 [new file with mode: 0644]

index ace16ad1bf2867d06986c84d18d71315b0de4b60..8f88b0b0042ef4962aa7ff57a744ec767a9d02dd 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-13  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/55959
+       * expr.c (gfc_simplify_expr): Branch is not unreachable.
+
 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/56266
index 829b0870a3be0ffca0d776e4d2b681f4db93d013..e4bcc794bd58ce924ea8068cc2766f097c70e82b 100644 (file)
@@ -1916,7 +1916,6 @@ gfc_simplify_expr (gfc_expr *p, int type)
 
     case EXPR_COMPCALL:
     case EXPR_PPC:
-      gcc_unreachable ();
       break;
     }
 
index c99fee879986dadc211ba724631f30a96e813294..28b9b62bd2e3b4101406a9f5f1ab388eac777d81 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-13  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/55959
+       * gfortran.dg/typebound_proc_29.f03: New.
+
 2013-04-12  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/56266
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_29.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
new file mode 100644 (file)
index 0000000..2650d14
--- /dev/null
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR 55959: [OOP] ICE in in gfc_simplify_expr, at fortran/expr.c:1920
+!
+! Contributed by Tilo Schwarz <tilo@tilo-schwarz.de>
+
+module pdfs
+  type :: pdf
+  contains
+    procedure, nopass :: getx
+  end type
+
+contains
+
+  real function getx()
+  end function
+
+end module
+
+program abstract
+  use pdfs
+  type(pdf) pp
+  print pp%getx()  ! { dg-error "must be of type default-kind CHARACTER or of INTEGER" }
+end program
+
+! { dg-final { cleanup-modules "pdfs" } }