public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2
@ 2020-04-01 12:51 marxin at gcc dot gnu.org
  2020-04-01 12:52 ` [Bug debug/94441] " marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-01 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94441
           Summary: [10 Regression] g++: error:
                    gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C:
                    ‘-fcompare-debug’ failure (length)
                    sincer10-7397-gda920d0c46c38fe2
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Since the revision I see the following error:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C
-fcompare-debug -O3 -fno-forward-propagate --param=max-cse-insns=0
-flive-range-shrinkage -std=c++17
g++: error:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C:
‘-fcompare-debug’ failure (length)

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

* [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2
  2020-04-01 12:51 [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2 marxin at gcc dot gnu.org
@ 2020-04-01 12:52 ` marxin at gcc dot gnu.org
  2020-04-01 15:18 ` [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2 jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-01 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |10.0
      Known to work|                            |9.3.0
   Last reconfirmed|                            |2020-04-01
      Known to fail|                            |10.0

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

* [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2
  2020-04-01 12:51 [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2 marxin at gcc dot gnu.org
  2020-04-01 12:52 ` [Bug debug/94441] " marxin at gcc dot gnu.org
@ 2020-04-01 15:18 ` jakub at gcc dot gnu.org
  2020-04-04  7:17 ` cvs-commit at gcc dot gnu.org
  2020-04-04  8:02 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-01 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48162
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48162&action=edit
gcc10-pr94441.patch

Untested fix.

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

* [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2
  2020-04-01 12:51 [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2 marxin at gcc dot gnu.org
  2020-04-01 12:52 ` [Bug debug/94441] " marxin at gcc dot gnu.org
  2020-04-01 15:18 ` [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2 jakub at gcc dot gnu.org
@ 2020-04-04  7:17 ` cvs-commit at gcc dot gnu.org
  2020-04-04  8:02 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-04  7:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:aae5d08a8d4dcee576a85ea76febe56c53675ef2

commit r10-7550-gaae5d08a8d4dcee576a85ea76febe56c53675ef2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Apr 4 09:16:07 2020 +0200

    c++: Fix further protected_set_expr_location related -fcompare-debug issues
[PR94441]

    My recent protected_set_expr_location changes work well when
    that function is called unconditionally, but as the testcase shows, the C++
    FE has a few spots that do:
      if (!EXPR_HAS_LOCATION (stmt))
        protected_set_expr_location (stmt, locus);
    or similar.  Now, if we have for -g0 stmt of some expression that can
    have location and has != UNKNOWN_LOCATION, while -g instead has
    a STATEMENT_LIST containing some DEBUG_BEGIN_STMTs + that expression with
    that location, we don't call protected_set_expr_location in the -g0 case,
    but do call it in the -g case, because on the STATEMENT_LIST
    !EXPR_HAS_LOCATION.
    The following patch introduces a helper function which digs up the single
    expression of a STATEMENT_LIST and uses that expression in the
    EXPR_HAS_LOCATION check (plus changes protected_set_expr_location to
    also use that helper).

    Or do we want a further wrapper, perhaps C++ FE only, that would do this
    protected_set_expr_location_if_unset (stmt, locus)?

    2020-04-04  Jakub Jelinek  <jakub@redhat.com>

            PR debug/94441
            * tree-iterator.h (expr_single): Declare.
            * tree-iterator.c (expr_single): New function.
            * tree.h (protected_set_expr_location_if_unset): Declare.
            * tree.c (protected_set_expr_location): Use expr_single.
            (protected_set_expr_location_if_unset): New function.

            * parser.c (cp_parser_omp_for_loop): Use
            protected_set_expr_location_if_unset.
            * cp-gimplify.c (genericize_if_stmt, genericize_cp_loop): Likewise.

            * g++.dg/opt/pr94441.C: New test.

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

* [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2
  2020-04-01 12:51 [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-04  7:17 ` cvs-commit at gcc dot gnu.org
@ 2020-04-04  8:02 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-04  8:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-04-04  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 12:51 [Bug debug/94441] New: [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) sincer10-7397-gda920d0c46c38fe2 marxin at gcc dot gnu.org
2020-04-01 12:52 ` [Bug debug/94441] " marxin at gcc dot gnu.org
2020-04-01 15:18 ` [Bug debug/94441] [10 Regression] g++: error: gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-if2.C: ‘-fcompare-debug’ failure (length) since r10-7397-gda920d0c46c38fe2 jakub at gcc dot gnu.org
2020-04-04  7:17 ` cvs-commit at gcc dot gnu.org
2020-04-04  8:02 ` 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).