public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
@ 2020-05-08 14:19 seurer at linux dot vnet.ibm.com
  2020-05-08 16:22 ` [Bug testsuite/95008] " hjl.tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: seurer at linux dot vnet.ibm.com @ 2020-05-08 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95008
           Summary: [11 regression] excess errors in
                    gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c
                    after r11-169
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at linux dot vnet.ibm.com
  Target Milestone: ---

this run    : g:f8a4141bae53f9125d374e5873dcda3f75392f1f, r11-169

FAIL: gcc.dg/analyzer/pr93382.c  (test for warnings, line 17)
FAIL: gcc.dg/two-types-6.c  (test for warnings, line 5)

The changes in r11-169 cause these tests to now fail, at least on powerpc64.

Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never  -fdiagnostics-urls=never   -fanalyzer
-fdiagnostics-path-format=separate-events -Wanalyzer-too-complex
-fanalyzer-call-summaries -fanalyzer-checker=taint -S -o pr93382.s    (timeout
= 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -fanalyzer
-fdiagnostics-path-format=separate-events -Wanalyzer-too-complex
-fanalyzer-call-summaries -fanalyzer-checker=taint -S -o pr93382.s
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c: In
function 'pl':
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:26:13:
warning: use of tainted value 'idx' in array lookup without bounds checking
[CWE-129] [-Wanalyzer-tainted-array-index]
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:23:1:
note: (1) entry to 'pl'
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:25:3:
note: (2) calling 'ql' from 'pl'
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:12:1:
note: (3) entry to 'ql'
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:16:3:
note: (4) 'n1' gets an unchecked value here
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:17:7:
note: (5) 'idx' has an unchecked value here (from 'n1')
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:25:3:
note: (6) returning to 'pl' from 'ql'
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/analyzer/pr93382.c:26:13:
note: (7) use of tainted value 'idx' in array lookup without bounds checking
PASS: gcc.dg/analyzer/pr93382.c  (test for warnings, line 16)
FAIL: gcc.dg/analyzer/pr93382.c  (test for warnings, line 17)
PASS: gcc.dg/analyzer/pr93382.c  (test for warnings, line 26)
PASS: gcc.dg/analyzer/pr93382.c (test for excess errors)


Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/two-types-6.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never  -fdiagnostics-urls=never   -std=gnu89 -S -o
two-types-6.s    (timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/two-types-6.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -std=gnu89 -S -o
two-types-6.s
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/two-types-6.c:6:3: error:
expected ';', identifier or '(' before 'struct'
compiler exited with status 1
FAIL: gcc.dg/two-types-6.c  (test for warnings, line 5)
PASS: gcc.dg/two-types-6.c  (test for errors, line 6)
PASS: gcc.dg/two-types-6.c (test for excess errors)

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

* [Bug testsuite/95008] [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
  2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
@ 2020-05-08 16:22 ` hjl.tools at gmail dot com
  2020-05-08 21:30 ` ro at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-05-08 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com
   Last reconfirmed|                            |2020-05-08
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.0

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

* [Bug testsuite/95008] [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
  2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
  2020-05-08 16:22 ` [Bug testsuite/95008] " hjl.tools at gmail dot com
@ 2020-05-08 21:30 ` ro at gcc dot gnu.org
  2020-05-08 23:00 ` manfred99 at gmx dot ch
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2020-05-08 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

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

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
They seem to happen everywhere.  AFAICS this patch cannot have been tested at
all.

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

* [Bug testsuite/95008] [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
  2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
  2020-05-08 16:22 ` [Bug testsuite/95008] " hjl.tools at gmail dot com
  2020-05-08 21:30 ` ro at gcc dot gnu.org
@ 2020-05-08 23:00 ` manfred99 at gmx dot ch
  2020-05-09 18:29 ` cvs-commit at gcc dot gnu.org
  2020-05-09 18:31 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: manfred99 at gmx dot ch @ 2020-05-08 23:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Manfred Schwarb <manfred99 at gmx dot ch> ---
gcc.dg/analyzer/pr93382.c: Sorry, I can't reproduce, this test passes for me.

gcc.dg/two-types-6.c: My bad, I forgot to mention this failure, as this
test did not make sense to me. I could not determine what the actual
intention of the test is. And the test nameing does not help either.
And finally it fell through the cracks, bah...

There should be a warning for the "struct f" line, no?
At the moment there is no warning, and so my correction triggered the
error.

If one adds a semicolon, there is the expected "does not declare anything",
but then there is no second error any more, so it fails, too.

To silence it, one could simply do
--- a/gcc/testsuite/gcc.dg/two-types-6.c
+++ b/gcc/testsuite/gcc.dg/two-types-6.c
@@ -2,6 +2,6 @@
 /* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */

 struct s {
-  struct f {} /* { dg-warning "does not declare anything" } */
+  struct f {}
   struct g {} x; /* { dg-error "expected ';', identifier or " } */
 };



Or, to get both, one could do
--- a/gcc/testsuite/gcc.dg/two-types-6.c
+++ b/gcc/testsuite/gcc.dg/two-types-6.c
@@ -2,6 +2,7 @@
 /* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */

 struct s {
-  struct f {} /* { dg-warning "does not declare anything" } */
+  struct e {}; /* { dg-warning "does not declare anything" } */
+  struct f {}
   struct g {} x; /* { dg-error "expected ';', identifier or " } */
 };

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

* [Bug testsuite/95008] [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
  2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
                   ` (2 preceding siblings ...)
  2020-05-08 23:00 ` manfred99 at gmx dot ch
@ 2020-05-09 18:29 ` cvs-commit at gcc dot gnu.org
  2020-05-09 18:31 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-09 18:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:8415ced06ed9690dfbce8b8b5f2f4f98f15598b6

commit r11-236-g8415ced06ed9690dfbce8b8b5f2f4f98f15598b6
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat May 9 20:27:40 2020 +0200

    testsuite: Fix up two testcases [PR95008]

    two-types-6.c never emitted the warning, even in 4.5/4.6, and pr93382.c
    doesn't have properly escaped parens, so doesn't check whether they are
    literally present in the message.

    2020-05-09  Jakub Jelinek  <jakub@redhat.com>

            PR testsuite/95008
            * gcc.dg/two-types-6.c: Remove dg-warning directive that never
            triggered.
            * gcc.dg/analyzer/pr93382.c: Properly escape ()s in the diagnostic
            message.

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

* [Bug testsuite/95008] [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169
  2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
                   ` (3 preceding siblings ...)
  2020-05-09 18:29 ` cvs-commit at gcc dot gnu.org
@ 2020-05-09 18:31 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-09 18:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-05-09 18:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 14:19 [Bug testsuite/95008] New: [11 regression] excess errors in gcc.dg/analyzer/pr93382.c and gcc.dg/two-types-6.c after r11-169 seurer at linux dot vnet.ibm.com
2020-05-08 16:22 ` [Bug testsuite/95008] " hjl.tools at gmail dot com
2020-05-08 21:30 ` ro at gcc dot gnu.org
2020-05-08 23:00 ` manfred99 at gmx dot ch
2020-05-09 18:29 ` cvs-commit at gcc dot gnu.org
2020-05-09 18:31 ` 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).