Bug 49086 - [4.7 Regression] libgomp/task.c:79:1: internal compiler error: Segmentation fault
Summary: [4.7 Regression] libgomp/task.c:79:1: internal compiler error: Segmentation f...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks: mozillametabug
  Show dependency treegraph
 
Reported: 2011-05-20 16:44 UTC by Dominique d'Humieres
Modified: 2011-05-20 22:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-05-20 18:07:57


Attachments
Preprocessed file task.i (12.08 KB, application/octet-stream)
2011-05-20 16:44 UTC, Dominique d'Humieres
Details
gcc46-pr49086.patch (373 bytes, patch)
2011-05-20 18:07 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2011-05-20 16:44:00 UTC
Created attachment 24306 [details]
Preprocessed file task.i

On x86_64-apple-darwin10 at revision 173960, bootstrap fails with the following ICE:

[macbook] x86_64-apple-darwin10.7.0/libgomp% /opt/gcc/build_w/./gcc/xgcc -B/opt/gcc/build_w/./gcc/ -B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/bin/ -B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/lib/ -DHAVE_CONFIG_H -I. -I../../../work/libgomp -I../../../work/libgomp/config/bsd -I../../../work/libgomp/config/posix -I../../../work/libgomp -Wall -pthread -Werror -g -O2 -MT single.lo -MD -MP -MF .deps/single.Tpo -c ../../../work/libgomp/task.c
../../../work/libgomp/task.c: In function 'GOMP_task':
../../../work/libgomp/task.c:79:1: internal compiler error: Segmentation fault
Comment 1 Dominique d'Humieres 2011-05-20 16:49:58 UTC
Backtrace

(gdb) run -DHAVE_CONFIG_H -I. -I../../../work/libgomp -I../../../work/libgomp/config/bsd -I../../../work/libgomp/config/posix -I../../../work/libgomp -Wall -Werror -g -O2 -MT single.lo -MD -MP -MF .deps/single.Tpo ../../../work/libgomp/task.cStarting program: /opt/gcc/build_w/gcc/cc1 -DHAVE_CONFIG_H -I. -I../../../work/libgomp -I../../../work/libgomp/config/bsd -I../../../work/libgomp/config/posix -I../../../work/libgomp -Wall -Werror -g -O2 -MT single.lo -MD -MP -MF .deps/single.Tpo ../../../work/libgomp/task.c
 _OSSwapInt16 _OSSwapInt32 _OSSwapInt64 __darwin_fd_isset gomp_mutex_init gomp_mutex_lock gomp_mutex_unlock gomp_mutex_destroy gomp_barrier_wait_start gomp_barrier_last_thread gomp_barrier_wait_last gomp_team_barrier_set_task_pending gomp_team_barrier_clear_task_pending gomp_team_barrier_set_waiting_for_tasks gomp_team_barrier_waiting_for_tasks gomp_team_barrier_done gomp_ptrlock_init gomp_ptrlock_get gomp_ptrlock_set gomp_ptrlock_destroy gomp_thread gomp_icv gomp_finish_task gomp_work_share_init_done __inline_memcpy_chk __inline_memmove_chk __inline_memset_chk __inline_strcpy_chk __inline_stpcpy_chk __inline_strncpy_chk __inline_strcat_chk __inline_strncat_chk gomp_init_task gomp_end_task gomp_clear_parent GOMP_task gomp_barrier_handle_tasks GOMP_taskwait
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <emutls> <whole-program> <ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions:
 gomp_init_task gomp_end_task GOMP_task
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000020
0x0000000100591de0 in dominated_by_p (dir=CDI_DOMINATORS, bb1=0x0, bb2=0x101357a90) at ../../work/gcc/dominance.c:972
972	  struct et_node *n1 = bb1->dom[dir_index], *n2 = bb2->dom[dir_index];
(gdb) bt
#0  0x0000000100591de0 in dominated_by_p (dir=CDI_DOMINATORS, bb1=0x0, bb2=0x101357a90) at ../../work/gcc/dominance.c:972
#1  0x00000001007a7d8d in or_comparisons_1 (code1=EQ_EXPR, op1a=0x101386cd0, op1b=0x14300fe40, code2=EQ_EXPR, op2a=0x101386d70, op2b=0x10127aca0) at ../../work/gcc/gimple-fold.c:2747
#2  0x00000001007a7ee0 in maybe_fold_or_comparisons (code1=EQ_EXPR, op1a=0x101386d70, op1b=0x10127aca0, code2=EQ_EXPR, op2a=0x101386cd0, op2b=0x14300fe40) at ../../work/gcc/gimple-fold.c:2790
#3  0x0000000100c30753 in ifcombine_iforif (inner_cond_bb=0x101357bc8, outer_cond_bb=0x101357a90) at ../../work/gcc/tree-ssa-ifcombine.c:521
#4  0x0000000100c3094f in tree_ssa_ifcombine_bb (inner_cond_bb=0x101357bc8) at ../../work/gcc/tree-ssa-ifcombine.c:611
#5  0x0000000100c30a9a in tree_ssa_ifcombine () at ../../work/gcc/tree-ssa-ifcombine.c:637
#6  0x0000000100995f58 in execute_one_pass (pass=0x1011fd9a0) at ../../work/gcc/passes.c:1556
#7  0x00000001009963dc in execute_pass_list (pass=0x1011fd9a0) at ../../work/gcc/passes.c:1610
#8  0x00000001009963fa in execute_pass_list (pass=0x1011fd160) at ../../work/gcc/passes.c:1611
#9  0x0000000100b83eb6 in tree_rest_of_compilation (fndecl=0x1431f0400) at ../../work/gcc/tree-optimize.c:417
#10 0x00000001004ff93e in cgraph_expand_function (node=0x1012c3250) at ../../work/gcc/cgraphunit.c:1630
#11 0x00000001004ffb0a in cgraph_expand_all_functions () at ../../work/gcc/cgraphunit.c:1689
#12 0x0000000100500273 in cgraph_optimize () at ../../work/gcc/cgraphunit.c:1952
#13 0x00000001004fcc80 in cgraph_finalize_compilation_unit () at ../../work/gcc/cgraphunit.c:1126
#14 0x00000001000374c2 in c_write_global_declarations () at ../../work/gcc/c-decl.c:9840
#15 0x0000000100ab3600 in compile_file () at ../../work/gcc/toplev.c:586
#16 0x0000000100ab61a6 in do_compile () at ../../work/gcc/toplev.c:1905
#17 0x0000000100ab6321 in toplev_main (argc=18, argv=0x7fff5fbfd830) at ../../work/gcc/toplev.c:1977
#18 0x000000010013c829 in main (argc=18, argv=0x7fff5fbfd830) at ../../work/gcc/main.c:36
Comment 2 Jan Hubicka 2011-05-20 17:48:16 UTC
Also reproduce during mozilla LTO build today.
Comment 3 Jakub Jelinek 2011-05-20 18:07:57 UTC
Created attachment 24308 [details]
gcc46-pr49086.patch

Can you please try this patch?
Comment 4 Jakub Jelinek 2011-05-20 18:22:52 UTC
Author: jakub
Date: Fri May 20 18:22:49 2011
New Revision: 173967

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173967
Log:
	PR bootstrap/49086
	* gimple-fold.c (and_comparisons_1, or_comparisons_1): Return NULL
	for PHI args that are SSA_NAME_IS_DEFAULT_DEF.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-fold.c
Comment 5 Jakub Jelinek 2011-05-20 18:23:40 UTC
Author: jakub
Date: Fri May 20 18:23:36 2011
New Revision: 173968

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173968
Log:
	PR bootstrap/49086
	* gimple-fold.c (and_comparisons_1, or_comparisons_1): Return NULL
	for PHI args that are SSA_NAME_IS_DEFAULT_DEF.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/gimple-fold.c
Comment 6 Dominique d'Humieres 2011-05-20 22:58:23 UTC
Bootstrapped revision 173968. Closing as fixed. Thanks.