From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH] Fortran: fix passing of optional dummies to bind(c) procedures [PR113866]
Date: Tue, 13 Feb 2024 20:28:00 +0100 [thread overview]
Message-ID: <7b1c29cd-b949-47f1-88ef-9acc058302ad@gmx.de> (raw)
In-Reply-To: <93681591-f729-42ee-ab4e-368f01ddc6ae@gmx.de>
Am 13.02.24 um 19:13 schrieb Harald Anlauf:
> indeed the new testcase just regressed due to commit
> r14-8947-g6caec7d9ec37e6 ... :-(
>
> Reduced testcase which fails on trunk:
>
> program p
> implicit none
> integer, parameter :: n = 100, l = 10
> character(l) :: a = 'a234567890', b(n) = 'bcdefghijk'
> character(:), allocatable :: d, e(:)
> allocate (d, source=a)
> allocate (e, source=b)
> print *, len (d), len (e), size (e)
> call not_bindc_optional_deferred (d, e)
> deallocate (d, e)
> contains
> subroutine not_bindc_optional_deferred (c5, c6)
> character(:), allocatable, optional :: c5, c6(:)
> if (.not. present (c5) .or. .not. present (c6)) stop 6
> print *, len (c5), len (c6), size (c6)
> if (len (c5) /= l .or. len (c6) /= l) stop 84
> end
> end
>
> Expected:
>
> 10 10 100
> 10 10 100
>
> After above commit:
>
> 10 10 100
> 10 0 100
> STOP 84
This is now tracked as::
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113911
> Will have to wait until the cause is found and fixed...
As it is sufficient to disable the deferred-length test,
I've done that and pushed the amended patch as
https://gcc.gnu.org/g:f4935df217ad89f884f908f39086b322e80123d0
Thanks,
Harald
prev parent reply other threads:[~2024-02-13 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 20:57 Harald Anlauf
2024-02-13 17:21 ` Steve Kargl
2024-02-13 18:13 ` Harald Anlauf
2024-02-13 19:28 ` Harald Anlauf [this message]
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=7b1c29cd-b949-47f1-88ef-9acc058302ad@gmx.de \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@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).