This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/33957] gfortran rejects valid initialization expression



------- Comment #2 from dominiq at lps dot ens dot fr  2007-10-31 13:17 -------
The test case is bogus (missing closing parenthesis and p is not a pointer). I
hope the following is valid:

! { dg-do compile }
function bug(i) result(c)
  integer, pointer :: i
  character(len=merge(1,2, associated(i))) :: c
  c = ""
end function bug

it is accepted by xlf and g95 (with or without -std=f95).

If my understanding of the proc 'check_inquiry' in expr.c is correct,
'associated' is not in the set inquiry_func_f2003.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33957


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