Bug 25799 - [4.2 Regression] cc1 stalled with -O1 -fmodulo-sched
Summary: [4.2 Regression] cc1 stalled with -O1 -fmodulo-sched
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Kenneth Zadeck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-15 22:25 UTC by Martin Drab
Modified: 2006-01-20 01:33 UTC (History)
1 user (show)

See Also:
Host:
Target: i?86-pc-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-16 19:11:26


Attachments
Triggers the problem (14.31 KB, text/plain)
2006-01-15 22:26 UTC, Martin Drab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Drab 2006-01-15 22:25:42 UTC
Attached code when compiled by gcc version 4.2.0 20060113 (experimental) using

----------
gcc -O1 -fmodulo-sched -c insmod.c -o insmod.o
----------

makes the cc1 (preprocessor) process stall indefinitely (well I let it few minutes, then killed manually. Tested only on x86. It is a regression, since it works with gcc version 4.2.0 20051224 (experimental). This bug may (or may not) be related to the bug 25798 (same test file, simillar compile flags).
Comment 1 Martin Drab 2006-01-15 22:26:46 UTC
Created attachment 10649 [details]
Triggers the problem

Same test file as in bug 25798.
Comment 2 Martin Drab 2006-01-15 22:47:03 UTC
OK, sorry, I somehow thought cc1 was a preprocessor, it isn't. My mistake, but anyway.
Comment 3 Andrew Pinski 2006-01-16 04:26:21 UTC
I saw this while reducing PR 25798 also.
Comment 4 Andrew Pinski 2006-01-16 04:28:30 UTC
This is an infinite loop in df.c:
0x0000000000559052 in df_hybrid_search_backward (bb=0x2aaaab34e400, dataflow=0xc15080, single_pass=0 '\0')
    at /home/pinskia/src/checkin/trunk/gcc/df-core.c:465
465             if (!TEST_BIT (dataflow->considered, e->dest->index))
(gdb) bt
#0  0x0000000000559052 in df_hybrid_search_backward (bb=0x2aaaab34e400, dataflow=0xc15080, 
    single_pass=0 '\0') at /home/pinskia/src/checkin/trunk/gcc/df-core.c:465
#1  0x00000000005591f1 in df_hybrid_search_backward (bb=0x2aaaab34e600, dataflow=0xc15080, 
    single_pass=0 '\0') at /home/pinskia/src/checkin/trunk/gcc/df-core.c:498
#2  0x00000000005591f1 in df_hybrid_search_backward (bb=0x2aaaab34e100, dataflow=0xc15080, 
    single_pass=0 '\0') at /home/pinskia/src/checkin/trunk/gcc/df-core.c:498
#3  0x0000000000559713 in df_iterative_dataflow (dataflow=0xc15080, blocks_to_consider=Variable "blocks_to_consider" is not available.
)
    at /home/pinskia/src/checkin/trunk/gcc/df-core.c:571
#4  0x0000000000558a97 in df_analyze (df=0xc1acd0) at /home/pinskia/src/checkin/trunk/gcc/df-core.c:653
#5  0x0000000000871a85 in sms_schedule (dump_file=0x0)
    at /home/pinskia/src/checkin/trunk/gcc/modulo-sched.c:983
Comment 5 zadeck@gcc.gnu.org 2006-01-17 14:34:54 UTC
Subject: Bug 25799

Author: zadeck
Date: Tue Jan 17 14:34:50 2006
New Revision: 109818

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109818
Log:
2005-01-17  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR dataflow/25799
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
	* (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.    



Modified:
    branches/dataflow-branch/gcc/ChangeLog.dataflow
    branches/dataflow-branch/gcc/df-problems.c

Comment 6 zadeck@gcc.gnu.org 2006-01-20 01:24:05 UTC
Subject: Bug 25799

Author: zadeck
Date: Fri Jan 20 01:24:00 2006
New Revision: 110007

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110007
Log:
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/25799 
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
        * (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.  Both of these problems were introduced in
	the dataflow rewrite.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/df-problems.c

Comment 7 zadeck@gcc.gnu.org 2006-01-20 01:28:37 UTC
Subject: Bug 25799

Author: zadeck
Date: Fri Jan 20 01:28:34 2006
New Revision: 110008

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110008
Log:
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/25799 
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
        (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.  Both of these problems were introduced in
	the dataflow rewrite.


Modified:
    trunk/gcc/ChangeLog

Comment 8 Kenneth Zadeck 2006-01-20 01:33:27 UTC
2005-01-19  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/25799 
	* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
	Corrected confluence operator to remove bits from op2 before oring
	with op1 rather than removing bits from op1.
        (df_ru_transfer_function): Corrected test on wrong bitmap which
	caused infinite loop.  Both of these problems were introduced in
	the dataflow rewrite.