1219820Sjeff! { dg-do compile } 2219820Sjeff! 3219820Sjeff! PR 39996: Double typing of function results not detected 4219820Sjeff! 5270710Shselasky! Contributed by Janus Weil <janus@gcc.gnu.org> 6219820Sjeff 7219820Sjeff interface 8219820Sjeff real function A () 9219820Sjeff end function 10219820Sjeff end interface 11219820Sjeff real :: A ! { dg-error "already has basic type of" } 12219820Sjeff 13219820Sjeff real :: B 14219820Sjeff interface 15219820Sjeff real function B () ! { dg-error "already has basic type of" } 16219820Sjeff end function ! { dg-error "Expecting END INTERFACE statement" } 17219820Sjeff end interface 18219820Sjeff 19219820Sjeff interface 20219820Sjeff function C () 21219820Sjeff real :: C 22219820Sjeff end function 23219820Sjeff end interface 24219820Sjeff real :: C ! { dg-error "already has basic type of" } 25219820Sjeff 26219820Sjeff real :: D 27219820Sjeff interface 28289644Shselasky function D () 29289644Shselasky real :: D ! { dg-error "already has basic type of" } 30219820Sjeff end function 31219820Sjeff end interface 32280210Shselasky 33219820Sjeff interface 34219820Sjeff function E () result (s) 35219820Sjeff real ::s 36219820Sjeff end function 37219820Sjeff end interface 38219820Sjeff real :: E ! { dg-error "already has basic type of" } 39219820Sjeff 40219820Sjeff real :: F 41330867Shselasky interface 42335414Shselasky function F () result (s) 43335414Shselasky real ::s ! { dg-error "already has basic type of" } 44335414Shselasky end function F 45335414Shselasky end interface 46280210Shselasky 47328653Shselaskyend 48219820Sjeff 49219820Sjeff