public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian
@ 2023-09-11 18:49 seurer at gcc dot gnu.org
  2023-09-11 18:57 ` [Bug other/111377] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: seurer at gcc dot gnu.org @ 2023-09-11 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111377
           Summary: [14 regression]
                    c-c++-common/analyzer/compound-assignment-1.c fails
                    after XXX on big endian
           Product: gcc
           Version: 14.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:50b5199cff690891726877e1c00ac53dfb7cc1c8, r14-3823-g50b5199cff6908


This fails just on BE for me.

make  -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32,m64}'
analyzer.exp=c-c++-common/analyzer/compound-assignment-1.c"
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++98  (test for
warnings, line 72)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++98 (test for
excess errors)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++14  (test for
warnings, line 72)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++14 (test for
excess errors)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++17  (test for
warnings, line 72)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++17 (test for
excess errors)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  (test for
warnings, line 72)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20 (test for
excess errors)


spawn -ignore SIGHUP
/home/seurer/gcc/git/build/gcc-test2/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/git/build/gcc-test2/gcc/testsuite/g++/../../
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c
-m32 -fdiagnostics-plain-output -nostdinc++
-I/home/seurer/gcc/git/build/gcc-test2/powerpc64-unknown-linux-gnu/32/libstdc++-v3/include/powerpc64-unknown-linux-gnu
-I/home/seurer/gcc/git/build/gcc-test2/powerpc64-unknown-linux-gnu/32/libstdc++-v3/include
-I/home/seurer/gcc/git/gcc-test2/libstdc++-v3/libsupc++
-I/home/seurer/gcc/git/gcc-test2/libstdc++-v3/include/backward
-I/home/seurer/gcc/git/gcc-test2/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++20 -fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries -S -o
compound-assignment-1.s
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:
In function 'void test_4()':
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:42:1:
warning: leak of 'r.ptr_wrapper::ptr' [CWE-401] [-Wanalyzer-malloc-leak]
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:41:26:
note: (1) allocated here
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:42:1:
note: (2) 'r.ptr_wrapper::ptr' leaks here; was allocated at (1)
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:
In function 'void test_5a()':
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:57:1:
warning: leak of 'q.ptr_wrapper::ptr' [CWE-401] [-Wanalyzer-malloc-leak]
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:54:6:
note: (1) entry to 'test_5a'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:56:44:
note: (2) calling 'called_by_test_5a' from 'test_5a'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:47:1:
note: (3) entry to 'called_by_test_5a'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:50:26:
note: (4) allocated here
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:56:44:
note: (5) returning to 'test_5a' from 'called_by_test_5a'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:57:1:
note: (6) 'q.ptr_wrapper::ptr' leaks here; was allocated at (4)
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:
In function 'void test_5b()':
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:71:21:
warning: leak of '<anonymous>.ptr_wrapper::ptr' [CWE-401]
[-Wanalyzer-malloc-leak]
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:69:6:
note: (1) entry to 'test_5b'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:71:21:
note: (2) calling 'called_by_test_5b' from 'test_5b'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:61:1:
note: (3) entry to 'called_by_test_5b'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:64:26:
note: (4) allocated here
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:71:21:
note: (5) returning to 'test_5b' from 'called_by_test_5b'
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:71:21:
note: (6) '<anonymous>.ptr_wrapper::ptr' leaks here; was allocated at (4)
PASS: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  (test for
warnings, line 41)
PASS: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  at line 43
(test for warnings, line 42)
PASS: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20 unknown leak at
line 44 (test for bogus messages, line 43)
PASS: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  (test for
warnings, line 50)
PASS: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  at line 58
(test for warnings, line 57)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20  (test for
warnings, line 72)
FAIL: c-c++-common/analyzer/compound-assignment-1.c  -std=c++20 (test for
excess errors)
Excess errors:
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/c-c++-common/analyzer/compound-assignment-1.c:71:21:
warning: leak of '<anonymous>.ptr_wrapper::ptr' [CWE-401]
[-Wanalyzer-malloc-leak]


commit 50b5199cff690891726877e1c00ac53dfb7cc1c8 (HEAD)
Author: benjamin priour <vultkayn@gcc.gnu.org>
Date:   Sat Sep 9 18:03:56 2023 +0200

    analyzer: Move gcc.dg/analyzer tests to c-c++-common (2) [PR96395]

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

* [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
@ 2023-09-11 18:57 ` jakub at gcc dot gnu.org
  2023-09-11 19:21 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-11 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

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> ---
It FAILs on i686-linux as well (but not x86_64-linux).  Dunno why it reports
sometimes on line 71 and sometimes on 72.

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

* [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
  2023-09-11 18:57 ` [Bug other/111377] " jakub at gcc dot gnu.org
@ 2023-09-11 19:21 ` pinskia at gcc dot gnu.org
  2023-09-12  6:55 ` [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-11 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629887.html

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

* [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
  2023-09-11 18:57 ` [Bug other/111377] " jakub at gcc dot gnu.org
  2023-09-11 19:21 ` pinskia at gcc dot gnu.org
@ 2023-09-12  6:55 ` jakub at gcc dot gnu.org
  2023-09-12 12:26 ` [Bug testsuite/111377] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-12  6:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As I wrote, the important difference is whether aggregate_value_p is true or
false for the called_by_test_5b call (which returns a struct but caller ignores
it).
If aggregate_value_p returns true, then there is a CLOBBER stmt after it
because it fills in memory, while otherwise not.  And this CLOBBER stmt has the
locus of the end of the scope, in this case the } ending the function
definition.
So, a workaround could be just move the last } to the previous line.

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

* [Bug testsuite/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-09-12  6:55 ` [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 " jakub at gcc dot gnu.org
@ 2023-09-12 12:26 ` rguenth at gcc dot gnu.org
  2023-09-19 15:49 ` cvs-commit at gcc dot gnu.org
  2023-09-19 15:50 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-12 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |testsuite-fail
   Target Milestone|---                         |14.0

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

* [Bug testsuite/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-09-12 12:26 ` [Bug testsuite/111377] " rguenth at gcc dot gnu.org
@ 2023-09-19 15:49 ` cvs-commit at gcc dot gnu.org
  2023-09-19 15:50 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-19 15:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:d2f53a601a23925b795ac162f7936163c3461b2c

commit r14-4143-gd2f53a601a23925b795ac162f7936163c3461b2c
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Sep 19 17:48:42 2023 +0200

    testsuite work-around compound-assignment-1.c C++ failures on various
targets [PR111377]

    On Mon, Sep 11, 2023 at 11:11:30PM +0200, Jakub Jelinek via Gcc-patches
wrote:
    > I think the divergence is whether called_by_test_5b returns the struct
    > in registers or in memory.  If in memory (like in the x86_64 -m32 case),
we have
    >   [compound-assignment-1.c:71:21] D.3191 = called_by_test_5b (); [return
slot optimization]
    >   [compound-assignment-1.c:71:21 discrim 1] D.3191 ={v} {CLOBBER(eol)};
    >   [compound-assignment-1.c:72:1] return;
    > in the IL, while if in registers (like x86_64 -m64 case), just
    >   [compound-assignment-1.c:71:21] D.3591 = called_by_test_5b ();
    >   [compound-assignment-1.c:72:1] return;
    >
    > If you just want to avoid the differences, putting } on the same line as
the
    > call might be a usable workaround for that.

    Here is the workaround in patch form.

    2023-09-19  Jakub Jelinek  <jakub@redhat.com>

            PR testsuite/111377
            * c-c++-common/analyzer/compound-assignment-1.c (test_5b): Move
            closing } to the same line as the call to work-around differences
in
            diagnostics line.

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

* [Bug testsuite/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 on big endian
  2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-09-19 15:49 ` cvs-commit at gcc dot gnu.org
@ 2023-09-19 15:50 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-19 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be fixed now.

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

end of thread, other threads:[~2023-09-19 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 18:49 [Bug other/111377] New: [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after XXX on big endian seurer at gcc dot gnu.org
2023-09-11 18:57 ` [Bug other/111377] " jakub at gcc dot gnu.org
2023-09-11 19:21 ` pinskia at gcc dot gnu.org
2023-09-12  6:55 ` [Bug other/111377] [14 regression] c-c++-common/analyzer/compound-assignment-1.c fails after r14-3823-g50b5199cff6908 " jakub at gcc dot gnu.org
2023-09-12 12:26 ` [Bug testsuite/111377] " rguenth at gcc dot gnu.org
2023-09-19 15:49 ` cvs-commit at gcc dot gnu.org
2023-09-19 15:50 ` 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).