This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33957] gfortran rejects valid initialization expression
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 13:17:21 -0000
- Subject: [Bug fortran/33957] gfortran rejects valid initialization expression
- References: <bug-33957-7575@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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