public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/33759] Unequal character lengths in MERGE intrinsic not detected at run time
Date: Fri, 12 Oct 2007 22:18:00 -0000 [thread overview]
Message-ID: <20071012221845.18221.qmail@sourceware.org> (raw)
In-Reply-To: <bug-33759-12313@http.gcc.gnu.org/bugzilla/>
------- Comment #2 from dominiq at lps dot ens dot fr 2007-10-12 22:18 -------
Subject: Re: Unequal character lengths in MERGE intrinsic
not detected at run time
> scalar ("string") is conformable with any array (such as "tmp")
Yes, I missed that, so if the length of string is only known at runtime,
it can only be caught at run time, however the Portland Group Fortran
detects it at compile time (constant folding?).
Now I have another odd result: the following code
character(len=1) :: string = "z"
character(len=20) :: tmp = ""
tmp = Upper ("abcdefgh")
print *, tmp
contains
Character (len=20) Function Upper (string)
Character(len=*) string
print *, len(string)
print *, size(transfer(string,"xy",len(string)))
Upper = ""
Upper(1:2) =
&
transfer(merge(transfer(string,"xy",len(string)), &
string(1:2), .true.), "xy")
return
end function Upper
end
gives
8
8
ab
with xlf, g95, Intel and PGF, but gfortran gives:
8
4
ab
a bug or an ambiguity of the transfer definition?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33759
next prev parent reply other threads:[~2007-10-12 22:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 20:30 [Bug fortran/33759] New: Unequal character lengths in MERGE intrinsic not detected in contained function dominiq at lps dot ens dot fr
2007-10-12 20:54 ` [Bug fortran/33759] Unequal character lengths in MERGE intrinsic not detected at run time burnus at gcc dot gnu dot org
2007-10-12 22:18 ` dominiq at lps dot ens dot fr [this message]
2007-10-23 15:52 ` pault at gcc dot gnu dot org
2007-10-23 16:08 ` pault at gcc dot gnu dot org
2007-10-24 11:36 ` dominiq at lps dot ens dot fr
2007-10-25 9:49 ` dominiq at lps dot ens dot fr
2007-11-12 15:03 ` pault at gcc dot gnu dot org
2007-11-12 15:34 ` pault at gcc dot gnu dot org
2007-11-12 16:48 ` dominiq at lps dot ens dot fr
2007-11-13 12:46 ` pault at gcc dot gnu dot org
2007-11-19 7:44 ` [Bug fortran/33759] ICE in transfer_simplify_4.f90 at any level of optimization pault at gcc dot gnu dot org
2008-02-26 12:45 ` pault at gcc dot gnu dot org
2008-03-04 23:48 ` fxcoudert at gcc dot gnu dot org
2008-10-21 6:30 ` pault at gcc dot gnu dot org
2008-11-12 17:04 ` jakub at gcc dot gnu dot org
2008-11-13 11:25 ` pault at gcc dot gnu dot org
2008-11-15 4:03 ` rguenth at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071012221845.18221.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).