Commit e4f719b4 by Mark Eggleston

Fortran : ICE in maybe_canonicalize_comparison_1 PR92993

This issue has been fixed by PR94090.  Add test case to ensure that
this does not re-occur.

2020-06-08  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

	PR fortran/92993
	* gfortran.dg/pr92993.f90: New test.

(cherry picked from commit 5dc3986103d8908c802e940dea8f2def3a6989c2)
parent ad48414d
! { dg-do compile }
!
! Original by G. Steinmetz
function f(x)
integer, intent(in) :: x
integer :: f
f = x
end
program p
interface
function f(x) ! { dg-error "POINTER attribute mismatch in function result" }
integer, intent(in) :: x
integer, pointer :: f
end
end interface
integer :: a(2) = [1, 2]
if ( a(2) .ne. f(a(2)) ) stop 1
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment