This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug 78619 - [6/7/8 Regression] ICE in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:889


On 7 November 2017 21:41:49 CET, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
>Dear All,
>
>I have a fix for the above but I am being driven mad by my inability
>to get the testcase right:
>
>! { dg-do compile }
>! { dg-options "-Werror -O3" }
>!
>! Tests the fix for PR78619, in which the recursive use of 'f' at line
>13
>! caused an ICE.
>!
>! Contributed by Gerhard Steinmetz 
><gerhard.steinmetz.fortran@t-online.de>
>!
>  print *, g(1.0) ! 'g' is OK
>contains
>  function f(x) result(z)
>    real :: x, z
>    z = sign(1.0, f) ! { dg-error "calling itself recursively|must be
>the same type" }
>  end
>  real function g(x)
>    real :: x
>    g = -1
>    g = -sign(1.0, g) ! This is OK.
>  end
>end
>! { dg-bogus "all warnings being treated as errors" }
>
>against a log output of:
>
>/home/pault/svn/trunk/gcc/testsuite/gfortran.dg/pr78619.f90:13:18:
>Error: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
>recursively.  Declare it RECURSIVE or use '-frecursive' [-Werror]
>/home/pault/svn/trunk/gcc/testsuite/gfortran.dg/pr78619.f90:13:18:
>Error: 'b' argument of 'sign' intrinsic at (1) must be the same type
>and kind as 'a'
>f951: all warnings being treated as errors
>compiler exited with status 1
>output is:
>/home/pault/svn/trunk/gcc/testsuite/gfortran.dg/pr78619.f90:13:18:
>Error: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
>recursively.  Declare it RECURSIVE or use '-frecursive' [-Werror]
>/home/pault/svn/trunk/gcc/testsuite/gfortran.dg/pr78619.f90:13:18:
>Error: 'b' argument of 'sign' intrinsic at (1) must be the same type
>and kind as 'a'
>f951: all warnings being treated as errors
>
>PASS: gfortran.dg/pr78619.f90   -O   (test for errors, line 13)
>PASS: gfortran.dg/pr78619.f90   -O   (test for bogus messages, line 21)
>FAIL: gfortran.dg/pr78619.f90   -O  (test for excess errors)
>Excess errors:
>f951: all warnings being treated as errors
>
>Can somebody advise, please?

I don't have the sources at hand but I'd first suggest dg-prune-output short of something more elegant. 

HTH


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]