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] |
On 13 Jan 2010, at 22:37, Richard Guenther wrote: > On Wed, Jan 13, 2010 at 11:15 PM, Simon Wright <simon.j.wright@mac.com> wrote: >> Apologies, I forgot to cc the list. >> >> Begin forwarded message: >> >>> From: Simon Wright <simon@pushface.org> >>> Date: 13 January 2010 22:05:40 GMT >>> To: Richard Guenther <richard.guenther@gmail.com> >>> Subject: Re: PATCH: Fix Ada bootstrap on Tru64 Unix, OpenVMS/Alpha and Darwin 10/x64 (PR middle-end/42068) >>> >>> On 13 Jan 2010, at 21:03, Richard Guenther wrote: >>> >>>> On Wed, Jan 13, 2010 at 9:47 PM, Simon Wright <simon@pushface.org> wrote: >>>>> While working on an alternative to Rainer's patch I failed to notice >>>>> the reversion to DECL_EXTERNAL (node->decl), so my change (which >>>>> produces a working compiler and its Ada library that passes PR >>>>> middle-end/42068's test case) is >>>>> >>>>> @@ -413,7 +413,7 @@ function_and_variable_visibility (bool whole_progr >>>>> { >>>>> if (!vnode->finalized) >>>>> continue; >>>>> - gcc_assert ((!DECL_WEAK (vnode->decl) && !DECL_COMMON (vnode->decl)) >>>>> + gcc_assert ((!DECL_WEAK (vnode->decl) || !DECL_COMMON (vnode->decl)) >>>>> || TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (vnode->decl)); >>>>> if (vnode->needed >>>>> && (DECL_COMDAT (vnode->decl) || TREE_PUBLIC (vnode->decl)) >>>> >>>> I think the intended assert might have been >>>> >>>> gcc_assert (!(DECL_WEAK (vnode->decl) && DECL_COMMON (vnode->decl)) >>>> && TREE_STATIC (vnode->decl) >>>> && (TREE_PUBLIC (vnode->decl) || DECL_EXTERNAl >>>> (vnode->decl))); >>>> >>>> the existing one doesn't make too much sense. Note I merged the TREE_STATIC >>>> check from the assert down in the function. >>>> >>>> If that works a patch to change it so is pre-approved. Please also remove >>>> the then redundant assert below in the function. >>> >>> Problem, I'm afraid: got >>> >>> /Users/simon/gcc-build-trunk/./gcc/xgcc -B/Users/simon/gcc-build-trunk/./gcc/ -B/opt/gcc-4.5.0-x86_64/x86_64-apple-darwin10.2.0/bin/ -B/opt/gcc-4.5.0-x86_64/x86_64-apple-darwin10.2.0/lib/ -isystem /opt/gcc-4.5.0-x86_64/x86_64-apple-darwin10.2.0/include -isystem /opt/gcc-4.5.0-x86_64/x86_64-apple-darwin10.2.0/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../../../gcc-trunk-svn/libgcc -I../../../gcc-trunk-svn/libgcc/. -I../../../gcc-trunk-svn/libgcc/../gcc -I../../../gcc-trunk-svn/libgcc/../include -DHAVE_CC_TLS -o _enable_execute_stack_s.o -MT _enable_execute_stack_s.o -MD -MP -MF _enable_execute_stack_s.dep -DSHARED -DL_enable_execute_stack -c ../../../gcc-trunk-svn/libgcc/../gcc/libgcc2.c >>> ../../../gcc-trunk-svn/libgcc/../gcc/libgcc2.c:2038:3: internal compiler error: in function_and_variable_visibility, at ipa.c:418 >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See <http://gcc.gnu.org/bugs.html> for instructions. >>> make[2]: *** [_enable_execute_stack_s.o] Error 1 >>> make[1]: *** [all-target-libgcc] Error 2 >>> >>> I split the assert up into >>> >>> gcc_assert (!(DECL_WEAK (vnode->decl) && DECL_COMMON (vnode->decl))); >>> >>> gcc_assert (TREE_STATIC (vnode->decl)); >>> >>> gcc_assert (TREE_PUBLIC (vnode->decl) || DECL_EXTERNAL (vnode->decl)); >>> >>> and it was the third which failed. > > Indeed. There are also local statics - the third assert should be dropped. > > Richard. Revised patch attached. 2010-01-13 Simon Wright <simon@pushface.org> PR middle-end/42068 Partially revert: 2009-11-12 Jan Hubicka <jh@suse.cz> * ipa.c (function_and_variable_visibility): Fix my accidentail commit and clear DECL_COMMON on localized declarations. 2009-11-12 Jan Hubicka <jh@suse.cz> * ipa.c (function_and_variable_visibility): Dump externally visible and needed variables.
Attachment:
gcc-ipa.c.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |