This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR/14058


Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz> writes:

> 2004-02-07  Josef Zlomek  <zlomekj@suse.cz>
> 
> 	* emit-rtl.c (set_decl_incoming_rtl): New.
> 	* tree.h (set_decl_incoming_rtl): New.
> 	* function.c (assign_parms): Use set_decl_incoming_rtl for setting
> 	DECL_INCOMING_RTL.
> 	* ada/misc.c (adjust_decl_rtl): Likewise.

This patch seems to be responsible for a couple of new mainline testsuite
failures on sparc-sun-solaris2.8 with -m64 (i.e. sparcv9):

+FAIL: gcc.c-torture/unsorted/pp.c,  -O0  
+FAIL: gcc.c-torture/unsorted/pp.c,  -O1  
+FAIL: gcc.c-torture/unsorted/pp.c,  -O2  
+FAIL: gcc.c-torture/unsorted/pp.c,  -O3 -fomit-frame-pointer  
+FAIL: gcc.c-torture/unsorted/pp.c,  -O3 -g  
+FAIL: gcc.c-torture/unsorted/pp.c,  -Os  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -O0  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -O1  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -O2  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -O3 -fomit-frame-pointer  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -O3 -g  
+FAIL: gcc.c-torture/unsorted/pret-arg.c,  -Os  
+FAIL: gcc.dg/compat/struct-by-value-19 c_compat_x_tst.o compile
+FAIL: gcc.dg/compat/struct-by-value-19 c_compat_y_tst.o compile
+FAIL: gcc.dg/compat/struct-by-value-20 c_compat_x_tst.o compile
+FAIL: gcc.dg/compat/struct-by-value-20 c_compat_y_tst.o compile

In all cases, cc1 SEGVs like this:

$ ./cc1 -m64 pp.i
 foo

/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/gcc.c-torture/unsorted/pp.c: In function `foo':
/vol/gnu/src/gcc/gcc-dist/gcc/testsuite/gcc.c-torture/unsorted/pp.c:4: internal compiler error: Segmentation Fault

Program received signal SIGSEGV, Segmentation fault.
0x0010be20 in set_decl_incoming_rtl (t=0xff1d1500, x=0xff1d40c0) at /vol/gnu/src/gcc/gcc-dist/gcc/emit-rtl.c:859
859               if (REG_P (XEXP (y, 0)))

#0  0x0010be20 in set_decl_incoming_rtl (t=0xff1d1500, x=0xff1d40c0) at /vol/gnu
/src/gcc/gcc-dist/gcc/emit-rtl.c:859
#1  0x00180454 in assign_parms (fndecl=0xff1d1180) at /vol/gnu/src/gcc/gcc-dist/gcc/function.c:4654
#2  0x0018435c in expand_function_start (subr=0xff1d1180, parms_have_cleanups=0) at /vol/gnu/src/gcc/gcc-dist/gcc/function.c:6718
#3  0x002c6620 in tree_rest_of_compilation (fndecl=0xff1d1180, nested_p=false) at /vol/gnu/src/gcc/gcc-dist/gcc/tree-optimize.c:131
#4  0x0005cb3c in c_expand_body_1 (fndecl=0xff1d1180, nested_p=0) at /vol/gnu/src/gcc/gcc-dist/gcc/c-decl.c:6118
#5  0x002c8614 in cgraph_expand_function (node=0xff1d1780) at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:533
#6  0x002c8730 in cgraph_assemble_pending_functions () at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:143
#7  0x002c9890 in cgraph_finalize_function (decl=0xff1d1180, nested=false) at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:224
#8  0x0005cffc in finish_function () at /vol/gnu/src/gcc/gcc-dist/gcc/c-decl.c:6075
#9  0x0003e610 in yyparse () at c-parse.y:405
#10 0x00043694 in c_parse_file () at c-parse.y:3050
#11 0x0008cfd4 in c_common_parse_file (set_yydebug=1) at /vol/gnu/src/gcc/gcc-dist/gcc/c-opts.c:1236
#12 0x00283b44 in toplev_main (argc=4064256, argv=0x3e0400) at /vol/gnu/src/gcc/gcc-dist/gcc/toplev.c:1824
Program received signal SIGSEGV, Segmentation fault.
0x0010be20 in set_decl_incoming_rtl (t=0xff1d1500, x=0xff1d40c0) at /vol/gnu/src/gcc/gcc-dist/gcc/emit-rtl.c:859
859               if (REG_P (XEXP (y, 0)))

#0  0x0010be20 in set_decl_incoming_rtl (t=0xff1d1500, x=0xff1d40c0) at /vol/gnu
/src/gcc/gcc-dist/gcc/emit-rtl.c:859
#1  0x00180454 in assign_parms (fndecl=0xff1d1180) at /vol/gnu/src/gcc/gcc-dist/gcc/function.c:4654
#2  0x0018435c in expand_function_start (subr=0xff1d1180, parms_have_cleanups=0) at /vol/gnu/src/gcc/gcc-dist/gcc/function.c:6718
#3  0x002c6620 in tree_rest_of_compilation (fndecl=0xff1d1180, nested_p=false) at /vol/gnu/src/gcc/gcc-dist/gcc/tree-optimize.c:131
#4  0x0005cb3c in c_expand_body_1 (fndecl=0xff1d1180, nested_p=0) at /vol/gnu/src/gcc/gcc-dist/gcc/c-decl.c:6118
#5  0x002c8614 in cgraph_expand_function (node=0xff1d1780) at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:533
#6  0x002c8730 in cgraph_assemble_pending_functions () at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:143
#7  0x002c9890 in cgraph_finalize_function (decl=0xff1d1180, nested=false) at /vol/gnu/src/gcc/gcc-dist/gcc/cgraphunit.c:224
#8  0x0005cffc in finish_function () at /vol/gnu/src/gcc/gcc-dist/gcc/c-decl.c:6075
#9  0x0003e610 in yyparse () at c-parse.y:405
#10 0x00043694 in c_parse_file () at c-parse.y:3050
#11 0x0008cfd4 in c_common_parse_file (set_yydebug=1) at /vol/gnu/src/gcc/gcc-dist/gcc/c-opts.c:1236
#12 0x00283b44 in toplev_main (argc=4064256, argv=0x3e0400) at /vol/gnu/src/gcc/gcc-dist/gcc/toplev.c:1824

Since this happens in your new set_decl_incoming_rtl function, this patch
is most likely the culprit.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]