mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-11 01:30:55 +08:00
re PR fortran/58471 (ICE on invalid with missing type constructor and -Wall)
2013-11-07 Janus Weil <janus@gcc.gnu.org> PR fortran/58471 * primary.c (gfc_expr_attr): Check for result symbol. 2013-11-07 Janus Weil <janus@gcc.gnu.org> PR fortran/58471 * gfortran.dg/constructor_9.f90: New. From-SVN: r204547
This commit is contained in:
parent
9de84e84f2
commit
50c7654b96
@ -1,3 +1,8 @@
|
||||
2013-11-07 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/58471
|
||||
* primary.c (gfc_expr_attr): Check for result symbol.
|
||||
|
||||
2013-11-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
* gfortran.texi: Fix typo.
|
||||
|
@ -2258,7 +2258,7 @@ gfc_expr_attr (gfc_expr *e)
|
||||
case EXPR_FUNCTION:
|
||||
gfc_clear_attr (&attr);
|
||||
|
||||
if (e->value.function.esym != NULL)
|
||||
if (e->value.function.esym && e->value.function.esym->result)
|
||||
{
|
||||
gfc_symbol *sym = e->value.function.esym->result;
|
||||
attr = sym->attr;
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-11-07 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/58471
|
||||
* gfortran.dg/constructor_9.f90: New.
|
||||
|
||||
2013-11-07 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/atomic-compare-exchange-1.c,
|
||||
|
22
gcc/testsuite/gfortran.dg/constructor_9.f90
Normal file
22
gcc/testsuite/gfortran.dg/constructor_9.f90
Normal file
@ -0,0 +1,22 @@
|
||||
! { dg-do compile }
|
||||
! { dg-options "-Wall" }
|
||||
!
|
||||
! PR 58471: [4.8/4.9 Regression] ICE on invalid with missing type constructor and -Wall
|
||||
!
|
||||
! Contributed by Andrew Benson <abensonca@gmail.com>
|
||||
|
||||
module cf
|
||||
implicit none
|
||||
type :: cfmde
|
||||
end type
|
||||
interface cfmde
|
||||
module procedure mdedc ! { dg-error "is neither function nor subroutine" }
|
||||
end interface
|
||||
contains
|
||||
subroutine cfi()
|
||||
type(cfmde), pointer :: cfd
|
||||
cfd=cfmde() ! { dg-error "Can't convert" }
|
||||
end subroutine
|
||||
end module
|
||||
|
||||
! { dg-final { cleanup-modules "cf" } }
|
Loading…
x
Reference in New Issue
Block a user