public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
@ 2022-01-14 18:58 seurer at gcc dot gnu.org
  2022-01-17  8:32 ` [Bug c++/104033] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: seurer at gcc dot gnu.org @ 2022-01-14 18:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104033
           Summary: [12 regression] g++.dg/cpp0x/constexpr-compare2.C
                    fails with excess errors after r12-6578
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:d686d5d85c23451c03799dc55e456b73065f7333, r12-6578

make  -k check-gcc RUNTESTFLAGS="dg.exp=g++.dg/cpp0x/constexpr-compare2.C"
FAIL: g++.dg/cpp0x/constexpr-compare2.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/cpp0x/constexpr-compare2.C  -std=c++17 (test for excess errors)
FAIL: g++.dg/cpp0x/constexpr-compare2.C  -std=c++2a (test for excess errors)
# of unexpected failures        3
# of unsupported tests          1

spawn -ignore SIGHUP
/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
-fdiagnostics-plain-output -nostdinc++
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++14 -pedantic-errors -Wno-long-long -fdelete-null-pointer-checks -S -o
constexpr-compare2.s^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: non-constant condition for static assertion^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: '(f != g)' is not a constant expression^M


spawn -ignore SIGHUP
/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../
exceptions_enabled603004.cc -fdiagnostics-plain-output -nostdinc++
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0
-S -o exceptions_enabled603004.s^M
FAIL: g++.dg/cpp0x/constexpr-compare2.C  -std=c++14 (test for excess errors)
Excess errors:
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: non-constant condition for static assertion
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: '(f != g)' is not a constant expression

spawn -ignore SIGHUP
/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C
-fdiagnostics-plain-output -nostdinc++
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
-I/home/seurer/gcc/git/build/gcc-test/powerpc64le-unknown-linux-gnu/libstdc++-v3/include
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward
-I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++17 -pedantic-errors -Wno-long-long -fdelete-null-pointer-checks -S -o
constexpr-compare2.s^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: non-constant condition for static assertion^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:7:17:
error: '(f != g)' is not a constant expression^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:10:20:
error: non-constant condition for static assertion^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/cpp0x/constexpr-compare2.C:10:20:
error: '(<lambda()>::_FUN != <lambda()>::_FUN)' is not a constant expression^M

commit d686d5d85c23451c03799dc55e456b73065f7333 (HEAD, refs/bisect/bad)
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jan 14 12:07:49 2022 +0100

    c++: Reject in constant evaluation address comparisons of start of one var
and end of another [PR89074]

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
@ 2022-01-17  8:32 ` rguenth at gcc dot gnu.org
  2022-01-17  8:36 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |c++
   Target Milestone|---                         |12.0

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
  2022-01-17  8:32 ` [Bug c++/104033] " rguenth at gcc dot gnu.org
@ 2022-01-17  8:36 ` jakub at gcc dot gnu.org
  2022-01-21  1:15 ` hp at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-17  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've mentioned it on the ml:
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587856.html just forgot
about it when committing the patch.
I'll fix this.

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
  2022-01-17  8:32 ` [Bug c++/104033] " rguenth at gcc dot gnu.org
  2022-01-17  8:36 ` jakub at gcc dot gnu.org
@ 2022-01-21  1:15 ` hp at gcc dot gnu.org
  2022-01-26 18:45 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hp at gcc dot gnu.org @ 2022-01-21  1:15 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

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

--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
I'm looking up all current regressions for my autotester.)

(In reply to Jakub Jelinek from comment #1)
> I've mentioned it on the ml:
> https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587856.html just
> forgot about it when committing the patch.
> I'll fix this.

Busy days.  I guess this was forgotten again?

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-01-21  1:15 ` hp at gcc dot gnu.org
@ 2022-01-26 18:45 ` pinskia at gcc dot gnu.org
  2022-01-26 18:46 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-26 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-01-26

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-01-26 18:45 ` pinskia at gcc dot gnu.org
@ 2022-01-26 18:46 ` pinskia at gcc dot gnu.org
  2022-01-26 18:46 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-26 18:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-01-26 18:46 ` pinskia at gcc dot gnu.org
@ 2022-01-26 18:46 ` pinskia at gcc dot gnu.org
  2022-02-06 10:21 ` cvs-commit at gcc dot gnu.org
  2022-02-06 10:27 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-26 18:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>From Jakub in the other bug report:
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587856.html
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588689.html
I need to rewrite the patch according to the patch review and didn't find time
for that yet.

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-01-26 18:46 ` pinskia at gcc dot gnu.org
@ 2022-02-06 10:21 ` cvs-commit at gcc dot gnu.org
  2022-02-06 10:27 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-06 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:f9e900ce9b17dc7d3a3809d0b0648ebe529a87c5

commit r12-7075-gf9e900ce9b17dc7d3a3809d0b0648ebe529a87c5
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sun Feb 6 11:16:29 2022 +0100

    c++: Further address_compare fixes [PR89074]

    This patch introduces folding_cxx_constexpr, folding_initializer is used
    for both C and C++ initializer/constant expression folding and enables more
    optimizations over what we do normally at runtime, while
folding_cxx_constexpr
    is used only during C++ constant expression folding and disables some
optimizations.

    The patch improves STRING_CST vs. STRING_CST folding, for
folding_initializer
    FUNCTION_DECL vs. FUNCTION_DECL folding, disables some optimizations like
    is_global_var != is_global_var or STRING_CST vs. DECL_P for
folding_cxx_constexpr
    etc.

    2022-02-06  Jakub Jelinek  <jakub@redhat.com>

            PR c++/89074
            PR c++/104033
            * fold-const.h (folding_initializer): Adjust comment.
            (folding_cxx_constexpr): Declare.
            * fold-const.cc (folding_initializer): Adjust comment.
            (folding_cxx_constexpr): New variable.
            (address_compare): Restrict the decl vs. STRING_CST
            or vice versa or STRING_CST vs. STRING_CST or
            is_global_var != is_global_var optimizations to
!folding_cxx_constexpr.
            Punt for FUNCTION_DECLs with non-zero offsets.  If
folding_initializer,
            assume non-aliased functions have non-zero size and have different
            addresses.  For folding_cxx_constexpr, punt on comparisons of start
            of some object and end of another one, regardless whether it is a
decl
            or string literal.  Also punt for folding_cxx_constexpr on
            STRING_CST vs. STRING_CST comparisons if the two literals could be
            overlapping.

            * constexpr.cc (cxx_eval_binary_expression): Temporarily set
            folding_cxx_constexpr.

            * g++.dg/cpp1y/constexpr-89074-3.C: New test.

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

* [Bug c++/104033] [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578
  2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-02-06 10:21 ` cvs-commit at gcc dot gnu.org
@ 2022-02-06 10:27 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-06 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-02-06 10:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 18:58 [Bug other/104033] New: [12 regression] g++.dg/cpp0x/constexpr-compare2.C fails with excess errors after r12-6578 seurer at gcc dot gnu.org
2022-01-17  8:32 ` [Bug c++/104033] " rguenth at gcc dot gnu.org
2022-01-17  8:36 ` jakub at gcc dot gnu.org
2022-01-21  1:15 ` hp at gcc dot gnu.org
2022-01-26 18:45 ` pinskia at gcc dot gnu.org
2022-01-26 18:46 ` pinskia at gcc dot gnu.org
2022-01-26 18:46 ` pinskia at gcc dot gnu.org
2022-02-06 10:21 ` cvs-commit at gcc dot gnu.org
2022-02-06 10:27 ` jakub 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).