From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Sun Oct  4 17:19:49 2020
Return-Path: <owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom9
Delivered-To: sc22wg5-dom9@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id DAEED3589AE; Sun,  4 Oct 2020 17:19:49 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 751 seconds by postgrey-1.34 at www5.open-std.org; Sun, 04 Oct 2020 17:19:49 CEST
Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by www.open-std.org (Postfix) with ESMTP id 5997E356BFB
	for <sc22wg5@open-std.org>; Sun,  4 Oct 2020 17:19:48 +0200 (CEST)
Received: from pps.filterd (m0150244.ppops.net [127.0.0.1])
	by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 094EWPfh000684
	for <sc22wg5@open-std.org>; Sun, 4 Oct 2020 15:07:15 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject :
 date : message-id : content-type : content-id : content-transfer-encoding
 : mime-version; s=pps0720;
 bh=3m9YbNswgYVHoDbrZqzPnPRzI7YyzcYtwm/MqPUwy48=;
 b=mU0t50NUSf6M/N8OfLMieodVkrmD+wACaEMLD1u972sCUKCmCVyXhrsWKTFlY6SfMtki
 qKbhqTAN0JB5v+/p0ZdwMUW+P9zzOF905efzhoHEvqmCNjiR4pgWnFc3c53AeE4MWikh
 0A9F2m09BL4k1+0Jr4AWQHNXRi4sYJGK1LM3hWcFFQXHufujMvs+MRMtXqIomD1uZPIf
 yKQShQrOWJzhvHvabxkOxdIeB5SlyB7J1p2EYYcxyiohJQFF83WZ57dUudJKML1lia4Y
 cdfm4eHQ7dZsXbw+LCFoJ7TOPmZgJ1sYfIJwB7K9QDROb7n4S+ynfkmKNXJNBwYNyQHM 5g== 
Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26])
	by mx0b-002e3701.pphosted.com with ESMTP id 33xhy2qspb-1
	(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
	for <sc22wg5@open-std.org>; Sun, 04 Oct 2020 15:07:15 +0000
Received: from G2W6310.americas.hpqcorp.net (g2w6310.austin.hp.com [16.197.64.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
	(No client certificate requested)
	by g2t2353.austin.hpe.com (Postfix) with ESMTPS id 1006877
	for <sc22wg5@open-std.org>; Sun,  4 Oct 2020 15:07:14 +0000 (UTC)
Received: from G9W8454.americas.hpqcorp.net (2002:10d8:a104::10d8:a104) by
 G2W6310.americas.hpqcorp.net (2002:10c5:4034::10c5:4034) with Microsoft SMTP
 Server (TLS) id 15.0.1497.2; Sun, 4 Oct 2020 15:07:14 +0000
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.12) by
 G9W8454.americas.hpqcorp.net (16.216.161.4) with Microsoft SMTP Server (TLS)
 id 15.0.1497.2 via Frontend Transport; Sun, 4 Oct 2020 15:07:14 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=PFTcnt/Z7/mwoJtM1OEVSfzl9dbirsZ0KdAp4A2CUyJrPzK3w/YGNBDe3wr0VyMEchRjgg9Or8LeXkCdyRWepIQ7ZGu3Lf8LiHqxYODu8O7+4ouGzmZrOCRDlI2Vdu41z9nMQ5dFCpNxV9KiNOT+5VWZZkM8iUUcaVkxOBU2eMWdcSt3W56iw/a4x0Vq16OrHwuESyt/Ad04oEo8+3G4BlhE2UdLag5b30fwfKfNkVihDAw1SYctN2sHhfhIEeqSE3FKmQH71oNZsxGlN4Jx6tC+mSNzjWMlpgqEsmbkGFLuby+XXutE9WP7yJHaxwLZip/mZC8YP9mArEbKzTQnwA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=3m9YbNswgYVHoDbrZqzPnPRzI7YyzcYtwm/MqPUwy48=;
 b=i31quWkXmepvQfhb8AsEP8GJxm/QdQIy3UgFIt0Al69ND5fu53SLKWlRhyvw+yYE6mRzpGgod+jPGmpfL58iln5l4r5xfckhdBGHYiACfhKvEdoIeaxuKGAW4Gob5iZLc8jR/B3Vyil87486czmjYlHjtg/eM9UirrthKBatz/phbCmjbrgb8Ogsz0aPB7lVXQJS3EsPWt+q19kVXPrD5jqmpPbD9GidzjBtXSH9R4k5RCzBy/BmF9alRMNSgsmL2IAVmRbUy2jeryrl0vdY09J0Hl5l0f4OiEnGWYL0VqxGs/0Y4+HnCBzV+rdc7XGLdUzwmQBdTYTEeS0tiNd4YA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass
 header.d=hpe.com; arc=none
Received: from CS1PR8401MB1158.NAMPRD84.PROD.OUTLOOK.COM
 (2a01:111:e400:7508::20) by CS1PR8401MB1271.NAMPRD84.PROD.OUTLOOK.COM
 (2a01:111:e400:750c::20) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.37; Sun, 4 Oct
 2020 15:07:13 +0000
Received: from CS1PR8401MB1158.NAMPRD84.PROD.OUTLOOK.COM
 ([fe80::7585:31e3:22f2:d249]) by CS1PR8401MB1158.NAMPRD84.PROD.OUTLOOK.COM
 ([fe80::7585:31e3:22f2:d249%10]) with mapi id 15.20.3433.043; Sun, 4 Oct 2020
 15:07:13 +0000
From: "Shterenlikht, Anton" <anton.shterenlikht@hpe.com>
To: WG5 List <sc22wg5@open-std.org>
Subject: WG5 letter ballot 1 on Fortran 2018 interpretations
Thread-Topic: WG5 letter ballot 1 on Fortran 2018 interpretations
Thread-Index: AQHWmmAJTj2agkE3Dkawg7cq6reAtg==
Date: Sun, 4 Oct 2020 15:07:12 +0000
Message-ID: <0B831EBA-DABA-4CA2-8488-56911ADDBE1B@hpe.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-mailer: Apple Mail (2.3445.104.15)
authentication-results: open-std.org; dkim=none (message not signed)
 header.d=none;open-std.org; dmarc=none action=none header.from=hpe.com;
x-originating-ip: [82.38.56.177]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 4e607f9e-a21b-4e4f-bbdf-08d868772c91
x-ms-traffictypediagnostic: CS1PR8401MB1271:
x-microsoft-antispam-prvs: <CS1PR8401MB1271A8743E19E4B89C25FEED9D0F0@CS1PR8401MB1271.NAMPRD84.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: twTyM63vPSNEKg15UKTsUSeqvwZzmCk0EvLgJWkj653EHLPlAHY6ucnZA4hvJ3rYBfzXw59KqfvDs/t4hnShj+Kfk4U/TcuTcyhV9Ufa2fhrKstJDO2p1tJmFGnp9lN7xcNt4wJ60G3BsYAkqI++WHrMNlhOCQAPHHv+czyEXi3JR46pGr3Yk4/ty2TsjDouRR9krGQxjJNeY8bkOMYKHeLUmvhTfKmmbbfgPgGr3zB1AMfMyk2QIdSh77N9iCQJVitkTNx37A6CRRTwltpILmvT4EquVfEiKMCgSTalsgUvXVYCQV+4S6lnVnjn6/aLpBjyNWoCgJIXI1SquxrmVQ==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1158.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(376002)(396003)(136003)(346002)(366004)(39860400002)(36756003)(8676002)(66556008)(64756008)(66446008)(5660300002)(76116006)(86362001)(66476007)(91956017)(6512007)(2906002)(6916009)(6506007)(478600001)(26005)(6486002)(8936002)(316002)(2616005)(33656002)(83380400001)(71200400001)(66946007)(186003);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata: 4F+qhzogG0d1CFkptqPKajnhF5Kt0rDnZu9B3ro7t4YBTesTHz6wjx8cPymCWAiN2Ns4WLLdNdY6RjtGCYNWLRRs9mm95+Ot9b1CLS7WNhV14Z5SrjeS6CEKmFX+rg9YwQkITqyL8KVWDjwIrWAoD541KrXS0AlhK08EkDaS62FIK2lGBeWiLeWtq0Z3GuD26X+R1M5E4nMqhQlFRgtAUCXR1wWi+aOSwtpIcI8QXM+Vg2BWVhUWCub44ffJ9eeyH5/RG/JlbCdfWv4ZWBOlTgwxuM4pQ1VGOaeCbl6zgT37fBUtp98END7/ESVW178AxbuWQSMoWSBnze0mWoa509Iv6C/Y555iWrfHh2ZVJpnxd1s8NBHi8QUjFVm19rdq0QOe88G+OLbxzLQinkfOZOZPm/ldvjDk7oX0dSW6xigoeC+JjUd0CBPUw0EdSuh+fq1n4nL6hfQ0EJdjQ8aoMEpZuRuzylx/eSq0FBb8gfcCQcrHem7pUZPYOVLADBu8y9Up7zMQB/IfLzoOhUiKqFuFmXGr9jXm6t8DShRdrj6RM/PSXZW+Z/fxGNqheg3SdwKiUfVQCwxkT7reDgmbXMuQhVSteJn4vEMjQVlmPPzQVjms2eefNnWu4TfAPSIBI5ZEUPNh8KKi1DmTPERtow==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-ID: <2FA26B6D9416C7419FF9D687992E662C@NAMPRD84.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1158.NAMPRD84.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 4e607f9e-a21b-4e4f-bbdf-08d868772c91
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2020 15:07:12.9251
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 6RqFusrX52+oeAQweWmb2X5jq7xliP67UOh3VquQ3YeI4TnInockYXTG2HR6c3nSeCEw8WhJTfU/MkcmnH83SMviV2ge/EKJJQo8P924rHs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1271
X-OriginatorOrg: hpe.com
X-HPE-SCL: -1
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687
 definitions=2020-10-04_13:2020-10-02,2020-10-04 signatures=0
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0
 mlxlogscore=468 priorityscore=1501 lowpriorityscore=0 phishscore=0
 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1011 mlxscore=0
 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2006250000 definitions=main-2010040111
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Yes  No Number   Title
-Y- --- F18/001  ACOSH principal value specification is wrong
-Y- --- F18/002  Internal procedures in generic interface blocks
-Y- --- F18/003  Pointer association of component of non-definable selector
-Y- --- F18/004  Program execution sequence with failed images
-Y- --- F18/005  Does INPUT_UNIT really identify the same unit as *?
-Y- --- F18/006  Connection of INPUT_UNIT on different images
-Y- --- F18/008  Contradictory assumed-rank requirements
-Y- --- F18/009  Bad examples in IEEE_ARITHMETIC functions
-Y- --- F18/010  Categories of pure procedures
-Y- --- F18/011  Categories of elemental procedures
-Y- --- F18/012  Internal procedure in a generic interface
-Y- --- F18/013  TEAM_NUMBER arguments and intrinsic function are ambiguous
-Y- --- F18/014  Type of OPERATION arguments to the REDUCE intrinsic
-C- --- F18/015  Example in C.6.8 is wrong
-Y- --- F18/016  Host association changes in Fortran 2018
-Y- --- F18/017  Final subroutine invocation order
-Y- --- F18/018  Public namelist and private variable

I have 2 comments on this example code.

Comment 1
---------

 21   ! Keep 1% spare images if we have a lot, just 1 if 10-199 images,
 22   !                                             0 if <10.
 23   images_spare =3D MAX(NUM_IMAGES()/100,0,MIN(NUM_IMAGES()-10,1))

There are 2 problems with this comment and with this code:

1. If NUM_IMAGES() returns 10, images_spare will be 0, not 1.
   Only when NUM_IMAGES() is 11, will images_spare becomes 1.
   Either the comment must be changed,
   or the code should be changed to "MIN(NUM_IMAGES()-9,1)".

2. The use of ",0" in the middle of the expression
   does not achieve anything, and is only confusing.
   The output of NUM_IMAGES() is non-negative,
   hence NUM_IMAGES()/100 is non-negative,
   so the result of the expression is unchanged
   if that ",0" is removed:

   images_spare =3D MAX( NUM_IMAGES()/100, MIN(NUM_IMAGES()-10,1) )

I prefer to rewrite this line explicitly as:

   images_spare =3D 0
   if ( NUM_IMAGES() .GE. 10  ) images_spare =3D 1
   if ( NUM_IMAGES() .GE. 200 ) images_spare =3D NUM_IMAGES()/100

The example is very complex already - no need to overcomplicate
it further.


Comment 2
---------

Variable name "team_number" is a poor choice because we
have intrinsic function TEAM_NUMBER.

It would be more clear to use this intrinsic in line 88,
i.e. replace=20

 88       IF (team_number =3D=3D 1) THEN

to

 88       IF ( TEAM_NUMBER() =3D=3D 1) THEN


and give the variable a different name, e.g. "tnum" or "team_num".


