Bug 47501 - [4.6 Regression] -fcompare-debug failure with -Os -fmodulo-sched
Summary: [4.6 Regression] -fcompare-debug failure with -Os -fmodulo-sched
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Alexandre Oliva
URL:
Keywords: compare-debug-failure
Depends on:
Blocks:
 
Reported: 2011-01-27 23:59 UTC by Zdenek Sojka
Modified: 2022-01-18 23:30 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.5.3
Known to fail: 4.6.0
Last reconfirmed: 2011-01-28 03:23:21


Attachments
reduced testcase (77 bytes, text/plain)
2011-01-27 23:59 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2011-01-27 23:59:23 UTC
Created attachment 23146 [details]
reduced testcase

Compiler output:
$ gcc -Os -fmodulo-sched -fcompare-debug testcase.c
gcc: error: testcase.c: -fcompare-debug failure (length)

$ diff testcase.*gkd
25a26
> (note# 0 0 NOTE_INSN_DELETED)

Tested revisions:
r169326 - fail
r169287 - fail
r169257 - OK
Comment 1 H.J. Lu 2011-01-28 03:23:21 UTC
It is caused by revision 169260:

http://gcc.gnu.org/ml/gcc-cvs/2011-01/msg00884.html
Comment 2 Alexandre Oliva 2011-01-31 10:15:49 UTC
Mine.  Patch reverted in revision 169429, testing revised patch at http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02260.html
Comment 3 Alexandre Oliva 2011-02-02 04:31:40 UTC
Author: aoliva
Date: Wed Feb  2 04:31:35 2011
New Revision: 169513

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169513
Log:
gcc/ChangeLog:
PR debug/47498
PR debug/47501
PR debug/45136
PR debug/45130
* haifa-sched.c (get_ebb_head_tail): Move notes across boundary
debug insns.
(no_real_insns_p, schedule_block, set_priorities): Drop special
treatment of boundary debug insns.
* sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug
insns.
* sched-ebb.c (schedule_ebbs): Adjust skipping of debug insns.
* sched-int.h (DEBUG_INSN_SCHED_P): Remove.
(BOUNDARY_DEBUG_INSN_P): Likewise.
(SCHEDULE_DEBUG_INSN_P): Likewise.
* sched-rgn.c (init_ready_list): Drop special treatment of
boundary debug insns.
* final.c (rest_of_clean_state): Clear notes' BB.
gcc/testsuite/ChangeLog:
PR debug/47498
PR debug/47501
PR debug/45136
PR debug/45130
* debug/pr47498.c: New.
* debug/pr47501.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/debug/pr47498.c
    trunk/gcc/testsuite/gcc.dg/debug/pr47501.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/final.c
    trunk/gcc/haifa-sched.c
    trunk/gcc/sched-deps.c
    trunk/gcc/sched-ebb.c
    trunk/gcc/sched-int.h
    trunk/gcc/sched-rgn.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Alexandre Oliva 2011-02-02 04:54:36 UTC
Fixed
Comment 5 Zdenek Sojka 2011-02-02 13:00:06 UTC
Thank you for quick fix. I tested that patch on top of r169501 (I tested it before with r169450, but deleted the results...) - bootstrap with yes,rtl,df checking went fine, check with RUNTESTFLAGS="--target_board=unix/-fschedule-insns2/-fsched2-use-superblocks/-fmodulo-sched/-fcompare-debug" showed no ICEs, -fcompare-debug failures or exec failures caused by that patch. (languages=c,c++,lto,fortran)