public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Fortran, OOP] PR 55959: ICE in in gfc_simplify_expr, at fortran/expr.c:1920
@ 2013-04-13 18:22 Janus Weil
  0 siblings, 0 replies; only message in thread
From: Janus Weil @ 2013-04-13 18:22 UTC (permalink / raw)
  To: gfortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hi all,

here is another trivial ICE-on-invalid fix that I will commit later
today (as obvious & regtested on x86_64-unknown-linux-gnu).

Cheers,
Janus


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.

[-- Attachment #2: pr55959.diff --]
[-- Type: application/octet-stream, Size: 334 bytes --]

Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c	(revision 197922)
+++ gcc/fortran/expr.c	(working copy)
@@ -1916,7 +1916,6 @@ gfc_simplify_expr (gfc_expr *p, int type)
 
     case EXPR_COMPCALL:
     case EXPR_PPC:
-      gcc_unreachable ();
       break;
     }
 

[-- Attachment #3: typebound_proc_29.f90 --]
[-- Type: application/octet-stream, Size: 475 bytes --]

! { 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" } }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-13  7:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13 18:22 [Patch, Fortran, OOP] PR 55959: ICE in in gfc_simplify_expr, at fortran/expr.c:1920 Janus Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).