public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: sgk@troutmask.apl.washington.edu,Steve Kargl
	<sgk@troutmask.apl.washington.edu>,Jerry DeLisle
	<jvdelisle@charter.net>
Cc: fortran@gcc.gnu.org
Subject: Re: BOZ, F2008 and F2015, and future of gfortran
Date: Fri, 06 Oct 2017 05:59:00 -0000	[thread overview]
Message-ID: <1CFEB0A1-3A0C-4639-B97E-0761EA007933@gmail.com> (raw)
In-Reply-To: <20171006050210.GB33258@troutmask.apl.washington.edu>

On October 6, 2017 7:02:10 AM GMT+02:00, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
>On Thu, Oct 05, 2017 at 09:36:06PM -0700, Jerry DeLisle wrote:
>> On 10/05/2017 02:10 PM, Steve Kargl wrote:
>> > Simply question.  Do people want gfortran to conform to
>> > the F2008 and F2015 standards for boz-literal-constants?
>> > Are people willing to let go of extension?
>> 
>> Yes, without any doubt we must comply with F2008 and F2015.
>> 
>> We should make anything that is non standard that has worked before
>(loosely
>> stated) only behave the same under -std=legacy and only if it makes
>sense to do so.
>> 
>> If there is a conflict between making sense and giving wrong results,
>then we
>> should choose an error. There is no room for ambiguity. If it gives
>wrong
>> results then it should give an error. Period!!!
>> 
>> I apologize for not getting in on this discussion sooner, but I have
>been busy.
>> 
>> Wrong results can not be tolerated, period!!
>> 
>
>No apologies necessary.  We're all strapped for time and it
>seems to be getting harder to attract new blood to fix things.
>
>At the moment, I have a patch that implements F2015 BOZ semantics
>with a number GNU Fortran.  There are a few regressions that 
>boil down to the following nonstandard code
>
>program foo
>   integer :: i(2) = [z'124', z'bed']
>   print *, i
>end program foo
>
>First, this is nonstandard in that a BOZ-literal-constant cannot 
>appear in the above context.  Unfortunately, the above leads
>to an ICE.  I need to figure how to walk the array constructor
>and have gfortran use the type and type kind parameter of the
>lhs to convert the rhs boz. 

I'm just guessing the semantics but you might find native_encode/interpret_expr useful in this context. 

Richard. 

 With my current patch, I have
>
>% tail gcc/testsuite/gfortran/gfortran.sum
>
># of expected passes            45883
># of unexpected failures        10
># of unexpected successes       6
># of expected failures          97
># of unsupported tests          79
>
>Also note that this is not a small diff
>
>%  svn diff | wc -l
>    1437
>
>and wrapping things inside -std=legacy will not be possibly
>(or is impractical) as I have almost completely replaced how
>gfortran handles BOZ.
>
>I'm fully aware that some may find the new BOZ handling
>to be less than satisfying.  Oh well.

  reply	other threads:[~2017-10-06  5:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 21:10 Steve Kargl
2017-10-06  4:36 ` Jerry DeLisle
2017-10-06  5:02   ` Steve Kargl
2017-10-06  5:59     ` Richard Biener [this message]
2017-10-06  6:20       ` Steve Kargl
2017-10-06 11:50         ` Richard Biener
2017-10-06 17:03           ` Steve Kargl

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=1CFEB0A1-3A0C-4639-B97E-0761EA007933@gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=jvdelisle@charter.net \
    --cc=sgk@troutmask.apl.washington.edu \
    /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).