public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/45055]  New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
@ 2010-07-24 13:00 zsojka at seznam dot cz
  2010-07-24 13:01 ` [Bug debug/45055] " zsojka at seznam dot cz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-24 13:00 UTC (permalink / raw)
  To: gcc-bugs

Command line:
$ gcc -fcompare-debug testcase.c -O2 -ftracer -fsched-pressure -funroll-loops
-fschedule-insns

Output with valgrind:
$ valgrind -q --trace-children=yes
/mnt/svn/gcc-trunk/binary-162456-lto-fortran-checking-yes-rtl-df/bin/gcc -O2
-ftracer -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug
testcase.c
==25565== Conditional jump or move depends on uninitialised value(s)
==25565==    at 0x70DD7B: walk_gimple_stmt (gimple.c:1629)
==25565==    by 0x95A913: dump_enumerated_decls (tree-ssa-live.c:1264)
==25565==    by 0x8FD118: execute_cleanup_cfg_post_optimizing
(tree-optimize.c:214)
==25565==    by 0x7BB16D: execute_one_pass (passes.c:1563)
==25565==    by 0x7BB404: execute_pass_list (passes.c:1618)
==25565==    by 0x8FDAA5: tree_rest_of_compilation (tree-optimize.c:452)
==25565==    by 0xAB4C75: cgraph_expand_function (cgraphunit.c:1643)
==25565==    by 0xAB7B09: cgraph_optimize (cgraphunit.c:1722)
==25565==    by 0xAB80FA: cgraph_finalize_compilation_unit (cgraphunit.c:1185)
==25565==    by 0x4DF3EE: c_write_global_declarations (c-decl.c:9698)
==25565==    by 0x8A91F5: toplev_main (toplev.c:990)
==25565==    by 0x6589BBC: (below main) (in /lib64/libc-2.11.2.so)
==25565== 
==26524== Conditional jump or move depends on uninitialised value(s)
==26524==    at 0x70DD7B: walk_gimple_stmt (gimple.c:1629)
==26524==    by 0x95A913: dump_enumerated_decls (tree-ssa-live.c:1264)
==26524==    by 0x8FD118: execute_cleanup_cfg_post_optimizing
(tree-optimize.c:214)
==26524==    by 0x7BB16D: execute_one_pass (passes.c:1563)
==26524==    by 0x7BB404: execute_pass_list (passes.c:1618)
==26524==    by 0x8FDAA5: tree_rest_of_compilation (tree-optimize.c:452)
==26524==    by 0xAB4C75: cgraph_expand_function (cgraphunit.c:1643)
==26524==    by 0xAB7B09: cgraph_optimize (cgraphunit.c:1722)
==26524==    by 0xAB80FA: cgraph_finalize_compilation_unit (cgraphunit.c:1185)
==26524==    by 0x4DF3EE: c_write_global_declarations (c-decl.c:9698)
==26524==    by 0x8A91F5: toplev_main (toplev.c:990)
==26524==    by 0x6589BBC: (below main) (in /lib64/libc-2.11.2.so)
==26524== 
gcc: error: testcase.c: -fcompare-debug failure (length)

The uninitialised read is probably not related, testcase fails in older
revisions, where this valgrind warning isn't present.

Tested revisions:
r162456 - fail
r162222 - fail
r159696 - fail
r153685 - fail


-- 
           Summary: another -fcompare-debug failure with uninitialised read
                    in walk_gimple_stmt
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
@ 2010-07-24 13:01 ` zsojka at seznam dot cz
  2010-07-30 11:58 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-24 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-07-24 13:01 -------
Created an attachment (id=21299)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21299&action=view)
reduced testcase

Command line:
$ gcc -O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns
-fcompare-debug pr45055.c 
gcc: error: pr45055.c: -fcompare-debug failure (length)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
  2010-07-24 13:01 ` [Bug debug/45055] " zsojka at seznam dot cz
@ 2010-07-30 11:58 ` jakub at gcc dot gnu dot org
  2010-07-30 14:37 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-30 11:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2010-07-30 11:57 -------
Created an attachment (id=21359)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21359&action=view)
gcc46-pr45055.patch

So far untested fix.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
  2010-07-24 13:01 ` [Bug debug/45055] " zsojka at seznam dot cz
  2010-07-30 11:58 ` jakub at gcc dot gnu dot org
@ 2010-07-30 14:37 ` jakub at gcc dot gnu dot org
  2010-07-30 15:58 ` [Bug debug/45055] [4.5/4.6 Regression] " jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-30 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2010-07-30 14:37 -------
Subject: Bug 45055

Author: jakub
Date: Fri Jul 30 14:36:56 2010
New Revision: 162714

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162714
Log:
        PR debug/45055
        PR rtl-optimization/45137
        * rtl.h (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn): New
        prototypes.
        * emit-rtl.c (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn):
        New functions.
        * combine.c (next_nonnote_nondebug_insn): Removed.
        * ifcvt.c (noce_process_if_block): Use prev_nonnote_nondebug_insn.
        * haifa-sched.c (queue_to_ready): Use next_nonnote_nondebug_insn.
        * sched-deps.c (sched_analyze_insn): Likewise.
        (fixup_sched_groups, deps_start_bb): Use prev_nonnote_nondebug_insn.
        * rtlanal.c (canonicalize_condition): Likewise.
        * postreload.c (reload_combine_recognize_pattern): Likewise.
        (reload_cse_move2add): Use next_nonnote_nondebug_insn.

        * gcc.dg/pr45055.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr45055.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/emit-rtl.c
    trunk/gcc/haifa-sched.c
    trunk/gcc/ifcvt.c
    trunk/gcc/postreload.c
    trunk/gcc/rtl.h
    trunk/gcc/rtlanal.c
    trunk/gcc/sched-deps.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] [4.5/4.6 Regression] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-07-30 14:37 ` jakub at gcc dot gnu dot org
@ 2010-07-30 15:58 ` jakub at gcc dot gnu dot org
  2010-08-12  9:15 ` jakub at gcc dot gnu dot org
  2010-08-12  9:33 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-30 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2010-07-30 15:57 -------
Fixed on the trunk, will backport to 4.5.2 once 4.5.1 is released.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|another -fcompare-debug     |[4.5/4.6 Regression] another
                   |failure with uninitialised  |-fcompare-debug failure with
                   |read in walk_gimple_stmt    |uninitialised read in
                   |                            |walk_gimple_stmt
   Target Milestone|---                         |4.5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] [4.5/4.6 Regression] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-07-30 15:58 ` [Bug debug/45055] [4.5/4.6 Regression] " jakub at gcc dot gnu dot org
@ 2010-08-12  9:15 ` jakub at gcc dot gnu dot org
  2010-08-12  9:33 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-08-12  9:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2010-08-12 09:15 -------
Subject: Bug 45055

Author: jakub
Date: Thu Aug 12 09:14:47 2010
New Revision: 163187

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163187
Log:
        Backport from mainline
        2010-07-30  Jakub Jelinek  <jakub@redhat.com>

        PR debug/45055
        PR rtl-optimization/45137
        * rtl.h (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn): New
        prototypes.
        * emit-rtl.c (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn):
        New functions.
        * combine.c (next_nonnote_nondebug_insn): Removed.
        * ifcvt.c (noce_process_if_block): Use prev_nonnote_nondebug_insn.
        * haifa-sched.c (queue_to_ready): Use next_nonnote_nondebug_insn.
        * sched-deps.c (sched_analyze_insn): Likewise.
        (fixup_sched_groups, deps_start_bb): Use prev_nonnote_nondebug_insn.
        * rtlanal.c (canonicalize_condition): Likewise.
        * postreload.c (reload_combine): Likewise.
        (reload_cse_move2add): Use next_nonnote_nondebug_insn.

        * gcc.dg/pr45055.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr45055.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/combine.c
    branches/gcc-4_5-branch/gcc/emit-rtl.c
    branches/gcc-4_5-branch/gcc/haifa-sched.c
    branches/gcc-4_5-branch/gcc/ifcvt.c
    branches/gcc-4_5-branch/gcc/postreload.c
    branches/gcc-4_5-branch/gcc/rtl.h
    branches/gcc-4_5-branch/gcc/rtlanal.c
    branches/gcc-4_5-branch/gcc/sched-deps.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

* [Bug debug/45055] [4.5/4.6 Regression] another -fcompare-debug failure with uninitialised read in walk_gimple_stmt
  2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-08-12  9:15 ` jakub at gcc dot gnu dot org
@ 2010-08-12  9:33 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-08-12  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-08-12 09:32 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45055


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

end of thread, other threads:[~2010-08-12  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-24 13:00 [Bug debug/45055] New: another -fcompare-debug failure with uninitialised read in walk_gimple_stmt zsojka at seznam dot cz
2010-07-24 13:01 ` [Bug debug/45055] " zsojka at seznam dot cz
2010-07-30 11:58 ` jakub at gcc dot gnu dot org
2010-07-30 14:37 ` jakub at gcc dot gnu dot org
2010-07-30 15:58 ` [Bug debug/45055] [4.5/4.6 Regression] " jakub at gcc dot gnu dot org
2010-08-12  9:15 ` jakub at gcc dot gnu dot org
2010-08-12  9:33 ` jakub at gcc dot gnu dot 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).