Jerry, all,
that was entirely my fault - attempting a last-minute cleanup
that reordered code, trying to use a refactoring. I've put
on my brown bag and pushed a corrections as obvious as:
r16-921-g74a2281ae18c6d.
See attached.
Caveat: this was tested on top of r16-915, as I cannot compile
anything after r16-916.
Let me know if that works for you.
Cheers,
Harald
On 5/27/25 22:42, Jerry D wrote:
After my last commit, I always rerun make check-fortran.
Now I see a bunch of fails. I reverted my patch locally and did a
rebuild and I still see these. Heralds patch still in there.
No failures after reverting this:
commit r16-914-g787a8dec1acedf5561c8ee43bed0b3653fca150d
Author: Harald Anlauf <anl...@gmx.de>
As my daughter would say. It happens to the best of us.
Jerry
--- snip ---
FAIL: gfortran.dg/associate_68.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/associate_68.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/associate_68.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/associate_68.f90 -O3 -fomit-frame-pointer -funroll-
loops -fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/associate_68.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/associate_68.f90 -Os (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -O3 -fomit-frame-pointer -funroll-
loops -fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/associate_65.f90 -Os (test for excess errors)
FAIL: gfortran.dg/coarray_sync.f90 -O (test for excess errors)
FAIL: gfortran.dg/data_pointer_2.f90 -O (test for excess errors)
FAIL: gfortran.dg/data_inquiry_ref.f90 -O (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_3.f90 -O (test for errors, line 19)
FAIL: gfortran.dg/inquiry_type_ref_3.f90 -O (test for errors, line 20)
FAIL: gfortran.dg/inquiry_type_ref_3.f90 -O (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_4.f90 -O (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -O0 (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -O1 (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -O2 (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -O3 -fomit-frame-pointer -
funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess
errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -O3 -g (test for excess errors)
FAIL: gfortran.dg/inquiry_type_ref_1.f08 -Os (test for excess errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -O0 (test for excess
errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -O1 (test for excess
errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -O2 (test for excess
errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions (test for
excess errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -O3 -g (test for excess
errors)
FAIL: gfortran.dg/parameter_array_init_8.f90 -Os (test for excess
errors)
FAIL: gfortran.dg/pr114739.f90 -O (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -O3 -fomit-frame-pointer -funroll-
loops -fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/pr87994_2.f90 -Os (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -O1 (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -O2 (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -O3 -fomit-frame-pointer -funroll-
loops -fpeel-loops -ftracer -finline-functions (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -O3 -g (test for excess errors)
FAIL: gfortran.dg/pr87994_3.f90 -Os (test for excess errors)
FAIL: gfortran.dg/pr87945_2.f90 -O (test for errors, line 5)
FAIL: gfortran.dg/pr87945_2.f90 -O (test for errors, line 6)
FAIL: gfortran.dg/pr87945_2.f90 -O (test for excess errors)
FAIL: gfortran.dg/pr91296.f90 -O (test for excess errors)
FAIL: gfortran.dg/pr95373_2.f90 -O (test for excess errors)
FAIL: gfortran.dg/pr95502.f90 -O (test for errors, line 7)
FAIL: gfortran.dg/pr95502.f90 -O (test for excess errors)
FAIL: gfortran.dg/pr95503.f90 -O (test for errors, line 6)
FAIL: gfortran.dg/pr95503.f90 -O (test for excess errors)
FAIL: gfortran.dg/statement_function_5.f90 -O (test for excess errors)
Running /home/jerry/dev/trunk/gcc/testsuite/gfortran.dg/f202y/f202y.exp ...
FAIL: gfortran.dg/goacc/ref_inquiry.f90 -O (test for errors, line 29)
FAIL: gfortran.dg/goacc/ref_inquiry.f90 -O (test for errors, line 30)
FAIL: gfortran.dg/goacc/ref_inquiry.f90 -O (test for errors, line 39)
FAIL: gfortran.dg/goacc/ref_inquiry.f90 -O (test for errors, line 40)
FAIL: gfortran.dg/goacc/ref_inquiry.f90 -O (test for excess errors)
Running /home/jerry/dev/trunk/gcc/testsuite/gfortran.dg/gomp/gomp.exp ...
FAIL: gfortran.dg/gomp/ref_inquiry.f90 -O (test for errors, line 25)
FAIL: gfortran.dg/gomp/ref_inquiry.f90 -O (test for errors, line 26)
FAIL: gfortran.dg/gomp/ref_inquiry.f90 -O (test for excess errors)
From 74a2281ae18c6dbbc640f0c79f7138a495ef8f0c Mon Sep 17 00:00:00 2001
From: Harald Anlauf <anl...@gmx.de>
Date: Tue, 27 May 2025 23:08:54 +0200
Subject: [PATCH] Fortran: fix regression introduced by commit
r16-914-g787a8dec1acedf
A last-minute cleanup before patch submission reordered a change
that should not have happened. This fixes it.
PR fortran/101735
gcc/fortran/ChangeLog:
* primary.cc (gfc_match_varspec): Correct order of logic.
---
gcc/fortran/primary.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc
index 426c994e67d..db5fc5de814 100644
--- a/gcc/fortran/primary.cc
+++ b/gcc/fortran/primary.cc
@@ -2686,16 +2686,17 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
else if (component == NULL && !inquiry)
return MATCH_ERROR;
- /* Find end of reference chain if inquiry reference and tail not set. */
- if (tail == NULL && inquiry && tmp)
- tail = extend_ref (primary, tail);
-
/* Extend the reference chain determined by gfc_find_component or
is_inquiry_ref. */
if (primary->ref == NULL)
primary->ref = tmp;
else
{
+ /* Find end of reference chain if inquiry reference and tail not
+ set. */
+ if (tail == NULL && inquiry && tmp)
+ tail = extend_ref (primary, tail);
+
/* Set by the for loop below for the last component ref. */
gcc_assert (tail != NULL);
tail->next = tmp;
--
2.43.0