Hi all,
I am working paper for the following syntax extension
int a[10];
int (*a)[*] = &a;
This would not be a wide pointer, it will just initialize
the size of the type from the initializer. This would
also work for VM type. So the result is a conventional
pointer to an arrays and either a
This patch reimplements the functionality of the previously-reverted
patch "Assumed-size arrays with non-lexical data mappings". The purpose
is to support implicit uses of assumed-size arrays for Fortran when those
arrays have already been mapped on the target some other way (e.g. by
This reverts commit 72733f6e6f6ec1bb9884fea8bfbebd3de03d9374.
2023-06-16 Julian Brown
gcc/
Revert:
* gimplify.cc (gimplify_adjust_omp_clauses_1): Raise error for
assumed-size arrays in map clauses for Fortran/OpenMP.
* omp-low.cc (lower_omp_target): Set the
Hi Tobias,
Am 15.03.23 um 10:10 schrieb Tobias Burnus:
Hi Harald,
On 14.03.23 20:38, Harald Anlauf wrote:
The testcase covers only non-coarray cases, as playing with
coarray variants hit pre-exisiting issues in gfortran that
are very likely unrelated to the interface checks.
I concur (but wou
Hi Harald,
On 14.03.23 20:38, Harald Anlauf wrote:
The testcase covers only non-coarray cases, as playing with
coarray variants hit pre-exisiting issues in gfortran that
are very likely unrelated to the interface checks.
I concur (but would not rule out additional interface issues).
I consider
:23:06 +0100
Subject: [PATCH] Fortran: rank checking with explicit-/assumed-size arrays and
CLASS [PR58331]
gcc/fortran/ChangeLog:
PR fortran/58331
* interface.cc (compare_parameter): Adjust check of array dummy
arguments to handle the case of CLASS variables.
gcc/testsuite/ChangeLog:
PR
On Wed, Feb 15, 2023 at 10:28:00PM +0100, Harald Anlauf via Fortran wrote:
> Dear all,
>
> I've committed the attached obvious and trivial patch for a NULL
> pointer dereference on behalf of Steve and after regtesting on
> x86_64-pc-linux-gnu as r13-6066-ga418129273725fd02e881e6fb5e0877287a1356c
>
00:00 2001
From: Steve Kargl
Date: Wed, 15 Feb 2023 22:20:22 +0100
Subject: [PATCH] Fortran: error recovery on invalid assumed size reference
[PR104554]
gcc/fortran/ChangeLog:
PR fortran/104554
* resolve.cc (check_assumed_size_reference): Avoid NULL pointer
dereference.
gcc/testsuite/ChangeLog:
if (gfc_peek_ascii_char () == '*')
> + {
> + /* F2018:R821: "assumed-implied-spec is [ lower-bound : ] *". */
> + gfc_error ("A lower bound must precede colon in "
> + "assumed-size array speci
Hi Steve,
Am 12.12.22 um 00:52 schrieb Steve Kargl via Gcc-patches:
On Sun, Dec 11, 2022 at 11:33:43PM +0100, Harald Anlauf via Fortran wrote:
Dear all,
the attached patch improves checking of array specs in two ways:
- bad assumed size array spec
- a bad first array element spec may already
On Sun, Dec 11, 2022 at 11:33:43PM +0100, Harald Anlauf via Fortran wrote:
> Dear all,
>
> the attached patch improves checking of array specs in two ways:
> - bad assumed size array spec
> - a bad first array element spec may already trigger an error,
> leading to a more c
Dear all,
the attached patch improves checking of array specs in two ways:
- bad assumed size array spec
- a bad first array element spec may already trigger an error,
leading to a more consistent behavior
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Thanks,
Harald
From
On Fri, Jul 29, 2022 at 11:47:54AM +0200, Tobias Burnus wrote:
> Testcase wise, the run-time testcase libgomp.fortran/examples-4/simd-2.f90
> checks essentially the same, except that it uses an array-descriptor array
> (assumed shape) while this testcase uses an assumed-size array.
>
Testcase wise, the run-time testcase libgomp.fortran/examples-4/simd-2.f90
checks essentially the same, except that it uses an array-descriptor array
(assumed shape) while this testcase uses an assumed-size array.
I decided for an extra compile-time only testcase, but it could be also be
moved
h case (i) for each dim. Thus:
>
> "If DIM is present,
> ARRAY is a whole array,
> and either ARRAY is an assumed-size array of rank DIM
> or dimension DIM of ARRAY has nonzero extent,
> the result has a value equal to the lower bound for subscript DIM of ARRAY.
>
ERRORs:
Running /scratch/tschwing/build2-trusty-cs/gcc/build/submit-big/source-gcc/gcc/testsuite/gfortran.dg/dg.exp ...
+ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
+ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
+ERROR: c_assumed num=100: x->dim[2].extent = -1
27;ve
pushed to master branch commit a43ae03a053faad871e6f48099d21e64b8e316cf
'Further test case adjustment re "Fortran: Fix assumed-size to
assumed-rank passing"', see attached.
Grüße
Thomas
-
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634
München; Gesell
nt the following. The case without 'dim' just iterates
through case (i) for each dim. Thus:
"If DIM is present,
ARRAY is a whole array,
and either ARRAY is an assumed-size array of rank DIM
or dimension DIM of ARRAY has nonzero extent,
the result has a value equal to the lower
has:
'Otherwise, if DIM is present, the result has a value equal to the
number of elements in dimension DIM of ARRAY.'
And lbound(a,dim=1) == 1 due to the "otherwise" case of F2018:16.9.109
LBOUND:
"Case (i): If DIM is present, ARRAY is a whole array, and either
ARRA
On 27.09.21 14:07, Tobias Burnus wrote:
now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0
I accidentally changed dg-note to dg-message when updating the expected
output, as the dump has changed. (Copying seemingly the sorry line
instead of the dg-note lines as template.)
Changed
to the "otherwise" case of F2018:16.9.109 LBOUND:
"Case (i): If DIM is present, ARRAY is a whole array, and either
ARRAY is an assumed-size array of rank DIM or dimension DIM of
ARRAY has nonzero extent, the result has a value equal to the
lower bound for subscript DIM of ARRAY. Other
Hi Tobias,
OK for mainline?
As promised on IRC, here's the review.
Maybe you can add a test case which shows that the call to the size
intrinsic really does not happen.
OK with that.
Thanks for the patch!
Best regards
Thomas
now - and reviewing
this patch first makes more sense.
size(a,dim=i) of an array is simply:
a.dim[i].ubound - a.dim[i].lbound + 1
except that the result is always >= 0, i.e. a(5:-10) has size 0.
Assumed-size arrays like as(5, -3:*) can be passed to assumed-rank
arrays – but, obviously,
On Thu, Mar 11, 2021 at 02:44:38PM +0100, Tobias Burnus wrote:
> Fortran/OpenMP: Fix use_device_{ptr,addr} with assumed-size array [PR98858]
>
> gcc/ChangeLog:
>
> PR fortran/98858
> * gimplify.c (omp_add_variable): Handle NULL_TREE as size
> occuring for a
The ICE occurs because the 't' == NULL for assumed-size arrays.
For them, the size is not known – but as this should only occur
for use_device_{addr,ptr}, the size is not needed.
OK for mainline?
Tobias
-
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 806
Hi Jose,
Proposed patch to PR95352 - ICE on select rank with assumed-size
selector and lbound intrinsic.
Patch tested only on x86_64-pc-linux-gnu.
Add check for NULL pointer before trying to access structure member,
patch by Steve Kargl.
this is OK, but you'll have to adjust
Hi Jose,
Proposed patch to PR94110 - Passing an assumed-size to an assumed-shape
argument should be rejected.
OK for master.
Thanks a lot for the patch!
Best regards
Thomas
Hi all!
Proposed patch to PR95352 - ICE on select rank with assumed-size
selector and lbound intrinsic.
Patch tested only on x86_64-pc-linux-gnu.
Add check for NULL pointer before trying to access structure member,
patch by Steve Kargl.
Thank you very much.
Best regards,
José Rui
2020
Hi all!
Proposed patch to PR94110 - Passing an assumed-size to an assumed-shape
argument should be rejected.
Patch tested only on x86_64-pc-linux-gnu.
Add code to also check for deferred-shape and assumed-rank pointer
(allocatable arguments are checked elsewhere) dummy arguments being
Hi Jose,
Proposed patch to Bug 94022 - Array slices of assumed-size arrays.
Patch tested only on x86_64-pc-linux-gnu.
Reviewed, regression-tested and commited as
r11-1228-g6a07010b774cb5a0b1790b857e69d3d8534eebd2 .
Thanks for the patch!
Regards
Thomas
Hi All!
Proposed patch to Bug 94022 - Array slices of assumed-size arrays.
Patch tested only on x86_64-pc-linux-gnu.
Make sure that when passing array sections of assumed-size arrays to
procedures expecting an assumed-rank array the upper bound of the last
dimension of the array section does
Hi Jose,
On 21/04/20 16:38, Thomas Koenig wrote:
Do you have commit privileges? It not, I can commit it for you.
No i do not. I would be grateful if you could.
Done, as
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=808a6eadda1a353ce3a70556feac128580491b24
.
Thanks a lot for the patch
Hi Thomas,
On 21/04/20 16:38, Thomas Koenig wrote:
Do you have commit privileges? It not, I can commit it for you.
No i do not. I would be grateful if you could.
Best regards,
José Rui
Hi Jose,
Proposed patch to Bug 90350 - ubound ICE on assumed size array even
though explicit bound is specified
Patch tested only on x86_64-pc-linux-gnu.
Best regards,
José Rui
Looks good.
Do you have commit privileges? It not, I can commit it for you.
Regards
Thomas
Hi again!
Proposed patch to Bug 90350 - ubound ICE on assumed size array even
though explicit bound is specified
Patch tested only on x86_64-pc-linux-gnu.
Best regards,
José Rui
2020-4-19 José Rui Faustino de Sousa
PR fortran/90350
* simplify.c (simplify_bound): In the case of assumed
the last dimension of an assumed-size array.
right?
If I have correctly understood the way things are done this is a more
general test which is already done at resolve.c around line 4690.
I just checked that it works, so I think this is fine. It looks
like assumed_size_refs_4.f90 already checks
Hi Thomas!
> ? In other words, maybe a check on the upper bound
> of the last dimension would be better?
>
You mean enforcing:
C928 (R921) The second subscript shall not be omitted from a
subscript-triplet in the last dimension of an assumed-size array.
right?
If I have
Hi Jose,
first, thanks for coming on board!
A question: Do you have a copyright assignment yet? This patch is
probably short enough that it can be accepted without it, but if
you're planning to contribute more (which I certainly hope) then
it would make sense to do this.
Regarding your patch,
Hi all!
Proposed patch to Bug 90350 - ubound ICE on assumed size array even
though explicit bound is specified
Patch tested only on x86_64-pc-linux-gnu.
Bumped into the same problem.
Probably a better fix would be to add an extra step to the reference
chain reflecting that array-section
cc-gcc-9-branch shortly.
Julian
ChangeLog
2019-07-10 Cesar Philippidis
Thomas Schwinge
Julian Brown
gcc/
* gimplify.c (gimplify_adjust_omp_clauses_1): Raise error for
assumed-size arrays in map clauses for Fortran/OpenMP.
ch as obvious and simple,
r271630.
Regards
Thomas
2019-05-26 Thomas Koenig
PR fortran/90539
* trans-types.c (get_formal_from_actual_arglist): Set rank
and lower bound for assumed size arguments.
Index: trans-ty
On 02/17/2018 06:22 AM, Thomas Koenig wrote:
Am 12.02.2018 um 11:46 schrieb Thomas Koenig:
Hello world,
the attached patch fixes a regression where a rejects-valid would
be issued.
OK for the affected branches, trunk and gcc-7?
PING ** (5.D0/7.D0) ?
Yes, OK
Jerry
Am 12.02.2018 um 11:46 schrieb Thomas Koenig:
Hello world,
the attached patch fixes a regression where a rejects-valid would
be issued.
OK for the affected branches, trunk and gcc-7?
PING ** (5.D0/7.D0) ?
assumed size array, leave in the last reference
and pass AR_SECTION instead of AR_FULL to gfc_resolve
in order to avoid an error.
2018-02-12 Thomas Koenig
PR fortran/84270
* gfortran.dg/inline_matmul_22.f90: New test.
Index: frontend-passes.c
case
> of assumed-size arrays, the size of the type may be NULL because its
> undefined. My fix for this solution is to set the size to one byte if
> the size of the type is NULL. This solution at least allows the runtime
> the opportunity to remap any data already present on the accelerat
Hi!
At least in my reading of the standard OpenMP 4.[05] does not disallow
explicit or implicit mapping of assumed-size arrays, but it is IMNSHO a
defect in the standard, it is something that can't be really supported
because the compiler does not know the size of the assumed size array.
Usually a data clause would would have OMP_CLAUSE_SIZE set, but not all
do. In the latter case, lower_omp_target falls back to using size of the
type of the variable specified in the data clause. However, in the case
of assumed-size arrays, the size of the type may be NULL because its
undefined
Hi all,
I have just committed as obvious a small ICE-on-invalid fix:
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=199445
Cheers,
Janus
48 matches
Mail list logo