public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included)
@ 2014-07-02 22:24 josh at joshtriplett dot org
  2014-07-03  6:51 ` [Bug middle-end/61677] " schwab@linux-m68k.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: josh at joshtriplett dot org @ 2014-07-02 22:24 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 11425 bytes --]

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

            Bug ID: 61677
           Summary: False positive with -Wmaybe-uninitialized (test case
                    included)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: josh at joshtriplett dot org

Created attachment 33055
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33055&action=edit
Test case for false positive in -Wmaybe-uninitialized

With the attached file bug.i:

$ gcc -Wall -O2 -c bug.i -o /dev/null
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here

The warning occurs in get_prompt_str, which initializes jump if (head &&
location), and subsequently uses jump if (head && location && ...).

gcc --version says "gcc (Debian 4.9.0-9) 4.9.0"
>From gcc-bugs-return-455535-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 02 22:32:31 2014
Return-Path: <gcc-bugs-return-455535-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13553 invoked by alias); 2 Jul 2014 22:32:29 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 13119 invoked by uid 48); 2 Jul 2014 22:32:16 -0000
From: "larsbj at gullik dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61678] New: internal compiler error: in expand_expr_real_1, at expr.c:9467
Date: Wed, 02 Jul 2014 22:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: larsbj at gullik dot net
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-61678-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00126.txt.bz2
Content-length: 1460

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

            Bug ID: 61678
           Summary: internal compiler error: in expand_expr_real_1, at
                    expr.c:9467
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: larsbj at gullik dot net

$ cat main.ii
struct Test {
    Test();
};

Test::Test()
{
    int w = 512;
    unsigned rgb_ref[1][w];
}


Gives this error:

$ /opt/gcc/gcc-trunk/bin/g++ -c main.ii
main.ii: In constructor ‘Test::Test()’:
main.ii:8:26: internal compiler error: in expand_expr_real_1, at expr.c:9467
     unsigned rgb_ref[1][w];
                          ^
0x77961b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:9462
0x7825e5 expand_expr
        ../../gcc/gcc/expr.h:451
0x7825e5 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../gcc/gcc/expr.c:8151
0x6c542e expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3294
0x6c542e expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:3354
0x6c656a expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:5192
0x6c8166 execute
        ../../gcc/gcc/cfgexpand.c:5799


This is with $ /opt/gcc/gcc-trunk/bin/g++ --version
g++ (GCC) 4.10.0 20140702 (experimental)
>From gcc-bugs-return-455536-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 02 23:00:38 2014
Return-Path: <gcc-bugs-return-455536-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22662 invoked by alias); 2 Jul 2014 23:00:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22291 invoked by uid 48); 2 Jul 2014 23:00:21 -0000
From: "gary at intrepid dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/61679] New: build fails with G++ 4.5.1 - prototype for hash_table does not match any in class
Date: Wed, 02 Jul 2014 23:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gary at intrepid dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-61679-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00127.txt.bz2
Content-length: 2504

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

            Bug ID: 61679
           Summary: build fails with G++ 4.5.1 - prototype for hash_table
                    does not match any in class
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gary at intrepid dot com

This build failure shows up on a recent source version of GCC 4.10 (212138
2014-06-30).  An attempt to bootstrap the compiler on an older system with GCC
4.5.1 installed fails as follows:

/a/gcc-4.5.1/bld/rls/bin/g++ -c  -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND
-DIN_GCC_FRONTEND -O0 -g3 -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual
-Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I.
-I. -I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc
-I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/.
-I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/../include
-I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/../libcpp/include 
-I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/../libdecnumber
-I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/../libdecnumber/bid
-I../libdecnumber -I/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/../libbacktrace   
-o attribs.o -MT attribs.o -MMD -MP -MF ./.deps/attribs.TPo
/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/attribs.c
In file included from /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/attribs.c:35:0:
/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/hash-table.h:667:1: error: prototype
for ‘typename Descriptor::value_type** hash_table<Descriptor, Allocator,
false>::find_empty_slot_for_expand(hashval_t)’ does not match any in class
‘hash_table<Descriptor, Allocator, false>’
/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/hash-table.h:606:16: error: candidate
is: hash_table<Descriptor, Allocator, false>::value_type**
hash_table<Descriptor, Allocator, false>::find_empty_slot_for_expand(hashval_t)
/eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/hash-table.h:807:1: error: prototype
for ‘typename Descriptor::value_type* hash_table<Descriptor, Allocator,
false>::find_with_hash(hash_table<Descriptor, Allocator, false>::compare_type*,
hashval_t)’ does not match any in class ‘hash_table<Descriptor, Allocator,
false>’
[...]
>From gcc-bugs-return-455537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jul 02 23:24:42 2014
Return-Path: <gcc-bugs-return-455537-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25895 invoked by alias); 2 Jul 2014 23:24:41 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25828 invoked by uid 48); 2 Jul 2014 23:24:29 -0000
From: "longb at cray dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/61680] New: vectorization gives wrong answer for sandybridge target
Date: Wed, 02 Jul 2014 23:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: longb at cray dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-61680-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00128.txt.bz2
Content-length: 879

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida680

            Bug ID: 61680
           Summary: vectorization gives wrong answer for sandybridge
                    target
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: longb at cray dot com

Created attachment 33056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3056&actioníit
test3.f90

Bad result:

> gfortran -march=corei7-avx -O3 test3.f90
> ./a.out
   10.000000000000000

Good result:

> gfortran -march=corei7-avx -O3 -fno-tree-vectorize  test3.f90
> ./a.out
   13.114877048604001
>

Version info:

> gfortran --version
GNU Fortran (GCC) 4.9.0 20140422 (Cray Inc.)
Copyright (C) 2014 Free Software Foundation, Inc.


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

* [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (test case included)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
@ 2014-07-03  6:51 ` schwab@linux-m68k.org
  2014-07-03 15:17 ` manu at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2014-07-03  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
That's why it's called -W*maybe*-uninitialized, false positives are expected.


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

* [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (test case included)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
  2014-07-03  6:51 ` [Bug middle-end/61677] " schwab@linux-m68k.org
@ 2014-07-03 15:17 ` manu at gcc dot gnu.org
  2014-07-03 15:26 ` manu at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2014-07-03 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2014-07-03
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This testcase needs minimizing: https://gcc.gnu.org/bugs/minimize.html

The uninit pass reports:

[BEFORE SIMPLICATION -- [USE]:
jump_227->offset = _110;
is guarded by :

_181 != 0


[BEFORE NORMALIZATION --[USE]:
jump_227->offset = _110;
is guarded by :

_181 != 0


[AFTER NORMALIZATION -- [USE]:
jump_227->offset = _110;
is guarded by :

_226 != 0 (.AND.) menu_108 == location_229


[BEFORE SIMPLICATION -- [DEF]:
jump_227 = PHI <jump_111(29), jump_127(D)(69)>
is guarded by :

location_92 != &rootmenu (.AND.)  (.NOT.) ivtmp.1338_129 != 8 (.AND.) _176 != 0
(.OR.)
 (.NOT.) location_92 != &rootmenu (.AND.) _95 != 0


[BEFORE NORMALIZATION --[DEF]:
jump_227 = PHI <jump_111(29), jump_127(D)(69)>
is guarded by :

location_92 != &rootmenu (.AND.)  (.NOT.) ivtmp.1338_129 != 8 (.AND.) _176 != 0
(.OR.)
 (.NOT.) location_92 != &rootmenu (.AND.) _95 != 0


[AFTER NORMALIZATION -- [DEF]:
jump_227 = PHI <jump_111(29), jump_127(D)(69)>
is guarded by :

head_36(D) != 0B (.AND.) location_89 != 0B (.AND.)  (.NOT.) ivtmp.1338_129 != 8
(.AND.) location_92 != &rootmenu
(.OR.)
head_36(D) != 0B (.AND.) location_130 != 0B (.AND.)  (.NOT.) location_92 !=
&rootmenu


[CHECK]: Found unguarded use: jump_227->offset = _110;

which does not clarify much what is going on.
>From gcc-bugs-return-455582-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 03 15:18:01 2014
Return-Path: <gcc-bugs-return-455582-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23933 invoked by alias); 3 Jul 2014 15:18:00 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22998 invoked by uid 48); 3 Jul 2014 15:17:52 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/61688] [4.10 Regression] ICE: tree check: expected record_type or union_type or qual_union_type, have array_type in ipa_binfo_from_known_type_jfunc
Date: Thu, 03 Jul 2014 15:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-61688-4-bFKSqFqfCq@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61688-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61688-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00173.txt.bz2
Content-length: 414

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida688

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjambor at suse dot cz

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Started with r198088.


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

* [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (test case included)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
  2014-07-03  6:51 ` [Bug middle-end/61677] " schwab@linux-m68k.org
  2014-07-03 15:17 ` manu at gcc dot gnu.org
@ 2014-07-03 15:26 ` manu at gcc dot gnu.org
  2021-03-29 21:23 ` [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP) cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2014-07-03 15:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Perhaps related to PR61409 or PR56574.
>From gcc-bugs-return-455584-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jul 03 15:34:07 2014
Return-Path: <gcc-bugs-return-455584-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19703 invoked by alias); 3 Jul 2014 15:34:06 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 19624 invoked by uid 48); 3 Jul 2014 15:33:56 -0000
From: "wmichaelv at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/61689] Assignment and Operator not working as intended.
Date: Thu, 03 Jul 2014 15:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.7.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: wmichaelv at hotmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61689-4-7eaKGK4QkE@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61689-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61689-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-07/txt/msg00175.txt.bz2
Content-length: 461

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida689

--- Comment #2 from wmichaelv at hotmail dot com ---
(In reply to Marek Polacek from comment #1)
> The program has undefined behaviour; an assignment is not a sequence point.
> See what -Wsequence-point says.

According to the order operation, grouping should be calculated first before
add, subtract, division, and multiplication, and assignment. And the
associativity of assignment is from right to left.


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

* [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
                   ` (2 preceding siblings ...)
  2014-07-03 15:26 ` manu at gcc dot gnu.org
@ 2021-03-29 21:23 ` cvs-commit at gcc dot gnu.org
  2021-03-29 21:29 ` msebor at gcc dot gnu.org
  2022-08-29 14:26 ` [Bug tree-optimization/61677] " rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-29 21:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:

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

commit r11-7898-gfecc835e216f537d3e7edb833cb3769489b983bb
Author: Martin Sebor <msebor@redhat.com>
Date:   Mon Mar 29 15:21:32 2021 -0600

    PR tree-optimization/61677 - False positive with -Wmaybe-uninitialized

    gcc/testsuite/ChangeLog:
            PR tree-optimization/61677
            * gcc.dg/uninit-pr61677.c: New test.

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

* [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
                   ` (3 preceding siblings ...)
  2021-03-29 21:23 ` [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP) cvs-commit at gcc dot gnu.org
@ 2021-03-29 21:29 ` msebor at gcc dot gnu.org
  2022-08-29 14:26 ` [Bug tree-optimization/61677] " rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-03-29 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

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

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
The false positive for the reduced test case from comment #4 was fixed by
r220696.  r11-7898 adds it to the testsuite.  The unreduced test case from
attachment 33055 still warns with GCC 11:

$ gcc -O2 -S -Wall pr61677-c0.c 
In file included from scripts/kconfig/zconf.tab.c:2537:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
In file included from scripts/kconfig/zconf.tab.c:2537:
scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here

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

* [Bug tree-optimization/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP)
  2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
                   ` (4 preceding siblings ...)
  2021-03-29 21:29 ` msebor at gcc dot gnu.org
@ 2022-08-29 14:26 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-29 14:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |13.0
   Last reconfirmed|2014-07-03 00:00:00         |2022-8-29
           Keywords|                            |needs-reduction

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reconfirmed with the original testcase.

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

end of thread, other threads:[~2022-08-29 14:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 22:24 [Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included) josh at joshtriplett dot org
2014-07-03  6:51 ` [Bug middle-end/61677] " schwab@linux-m68k.org
2014-07-03 15:17 ` manu at gcc dot gnu.org
2014-07-03 15:26 ` manu at gcc dot gnu.org
2021-03-29 21:23 ` [Bug middle-end/61677] False positive with -Wmaybe-uninitialized (predicate analysis, VRP) cvs-commit at gcc dot gnu.org
2021-03-29 21:29 ` msebor at gcc dot gnu.org
2022-08-29 14:26 ` [Bug tree-optimization/61677] " rguenth 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).