public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
@ 2023-07-20 21:44 thiago.bauermann at linaro dot org
  2023-07-20 21:51 ` [Bug testsuite/110756] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-07-20 21:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

            Bug ID: 110756
           Summary: [14 Regression] commit g:92d1425ca78 causes failures
                    in g++.dg/gomp/pr58567.C
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago.bauermann at linaro dot org
                CC: ppalka at gcc dot gnu.org
  Target Milestone: ---

Our CI detected that commit g:92d1425ca780 "c++: redundant targ coercion for
var/alias tmpls" caused these testsuite failures:

Running g++:g++.dg/gomp/gomp.exp ...
FAIL: g++.dg/gomp/pr58567.C -std=c++14 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++17 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++20 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++98 (test for excess errors)

I confirmed that the problem is still present in trunk as of commit
g:b50a851eef4b "i386: Double-word sign-extension missed-optimization
[PR110717]" from today.

I also confirmed that reverting the mentioned commit from trunk fixes the test
failures. Reproduced the problem on Ubuntu 22.04, on both aarch64-linux and
x86_64-linux.

The relevant part of g++.log is:

Executing on host:
/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++
-B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C   
-fdiagnostics-plain-output  -nostdinc++
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
 -std=c++20 -fopenmp  -S -o pr58567.s    (timeout = 300)
spawn -ignore SIGHUP
/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++
-B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C
-fdiagnostics-plain-output -nostdinc++
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++20 -fopenmp -S -o pr58567.s
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C: In
instantiation of 'void foo() [with T = int]':
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:14:11:  
required from here
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:22: error:
'int' is not a class, struct, or union type
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error:
invalid type for iteration variable 'i'
compiler exited with status 1
PASS: g++.dg/gomp/pr58567.C  -std=c++20  (test for errors, line 8)
FAIL: g++.dg/gomp/pr58567.C  -std=c++20 (test for excess errors)
Excess errors:
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error:
invalid type for iteration variable 'i'


Tested with:

$ ~/src/gcc/configure \
    --disable-bootstrap \
    --disable-multilib \
&& make -j 8 \
&& make -C gcc check-c++ RUNTESTFLAGS=g++.dg/gomp/gomp.exp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
@ 2023-07-20 21:51 ` pinskia at gcc dot gnu.org
  2023-07-20 23:15 ` thiago.bauermann at linaro dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-20 21:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |testsuite-fail
          Component|c++                         |testsuite
   Target Milestone|---                         |14.0
   Last reconfirmed|                            |2023-07-20
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.  When I looked into this, I got the feeling it was a testsuite issue
in that the error message changed slightly.

Before that change we had got:
```
<source>:8:22: error: 'int' is not a class, struct, or union type
    8 |   for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not
a class, struct, or union type|expected iteration declaration or
initialization" } */
      |                      ^
<source>:8:22: error: 'int' is not a class, struct, or union type
<source>:8:22: error: 'int' is not a class, struct, or union type
<source>:8:3: error: expected iteration declaration or initialization
    8 |   for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not
a class, struct, or union type|expected iteration declaration or
initialization" } */
      |   ^~~
```

And afterwards:
```
<source>:8:22: error: 'int' is not a class, struct, or union type
    8 |   for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not
a class, struct, or union type|expected iteration declaration or
initialization" } */
      |                      ^
<source>:8:3: error: invalid type for iteration variable 'i'
    8 |   for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not
a class, struct, or union type|expected iteration declaration or
initialization" } */
      |   ^~~
```

The afterwards seems like a better error message really and no longer repeated
too.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
  2023-07-20 21:51 ` [Bug testsuite/110756] " pinskia at gcc dot gnu.org
@ 2023-07-20 23:15 ` thiago.bauermann at linaro dot org
  2023-07-21 13:38 ` ppalka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: thiago.bauermann at linaro dot org @ 2023-07-20 23:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

--- Comment #2 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
Ah! Thanks for the analysis. Should I submit the following patch to the mailing
list then?

diff --git a/gcc/testsuite/g++.dg/gomp/pr58567.C
b/gcc/testsuite/g++.dg/gomp/pr58567.C
index 35a5bb027ffe..866d831c65e4 100644
--- a/gcc/testsuite/g++.dg/gomp/pr58567.C
+++ b/gcc/testsuite/g++.dg/gomp/pr58567.C
@@ -5,7 +5,7 @@
 template<typename T> void foo()
 {
   #pragma omp parallel for
-  for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not a
class, struct, or union type|expected iteration declaration or initialization"
} */
+  for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not a
class, struct, or union type|invalid type for iteration variable 'i'" } */
     ;
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
  2023-07-20 21:51 ` [Bug testsuite/110756] " pinskia at gcc dot gnu.org
  2023-07-20 23:15 ` thiago.bauermann at linaro dot org
@ 2023-07-21 13:38 ` ppalka at gcc dot gnu.org
  2023-07-21 19:53 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-07-21 13:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Whoops, sorry for not catching this.. I agree with Andrew, and your proposed
patch looks good to me FWIW

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
                   ` (2 preceding siblings ...)
  2023-07-21 13:38 ` ppalka at gcc dot gnu.org
@ 2023-07-21 19:53 ` pinskia at gcc dot gnu.org
  2023-08-20 19:02 ` cvs-commit at gcc dot gnu.org
  2023-08-20 19:05 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-21 19:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |seurer at gcc dot gnu.org

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110771 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
                   ` (3 preceding siblings ...)
  2023-07-21 19:53 ` pinskia at gcc dot gnu.org
@ 2023-08-20 19:02 ` cvs-commit at gcc dot gnu.org
  2023-08-20 19:05 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-20 19:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:40a6803c6d8ca244a7bdda8e4ec986c418362b24

commit r14-3344-g40a6803c6d8ca244a7bdda8e4ec986c418362b24
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date:   Sun Aug 20 20:46:05 2023 +0200

    testsuite: Adjust g++.dg/gomp/pr58567.C to new compiler message

    Commit 92d1425ca780 "c++: redundant targ coercion for var/alias tmpls"
    changed the compiler error message in this testcase from

    <source>: In instantiation of 'void foo() [with T = int]':
    <source>:14:11:   required from here
    <source>:8:22: error: 'int' is not a class, struct, or union type
    <source>:8:22: error: 'int' is not a class, struct, or union type
    <source>:8:22: error: 'int' is not a class, struct, or union type
    <source>:8:3: error: expected iteration declaration or initialization
    compiler exited with status 1

    to:

    <source>: In instantiation of 'void foo() [with T = int]':
    <source>:14:11:   required from here
    <source>:8:22: error: 'int' is not a class, struct, or union type
    <source>:8:3: error: invalid type for iteration variable 'i'
    compiler exited with status 1
    Excess errors:
    <source>:8:3: error: invalid type for iteration variable 'i'

    Andrew Pinski analysed the issue in PR 110756 and considered that it was a
    testsuite issue in that the error message changed slightly.  Also, it's a
    better error message.

    Therefore, we only need to adjust the testcase to expect the new message.

    gcc/testsuite/ChangeLog:
            PR testsuite/110756
            * g++.dg/gomp/pr58567.C: Adjust to new compiler error message.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C
  2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
                   ` (4 preceding siblings ...)
  2023-08-20 19:02 ` cvs-commit at gcc dot gnu.org
@ 2023-08-20 19:05 ` burnus at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2023-08-20 19:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Close as FIXED.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-20 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 21:44 [Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C thiago.bauermann at linaro dot org
2023-07-20 21:51 ` [Bug testsuite/110756] " pinskia at gcc dot gnu.org
2023-07-20 23:15 ` thiago.bauermann at linaro dot org
2023-07-21 13:38 ` ppalka at gcc dot gnu.org
2023-07-21 19:53 ` pinskia at gcc dot gnu.org
2023-08-20 19:02 ` cvs-commit at gcc dot gnu.org
2023-08-20 19:05 ` burnus at gcc dot gnu.org

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).