[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #34 from rguenth at gcc dot gnu dot org 2010-07-23 11:41 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #35 from justinmattock at gmail dot com 2010-07-23 13:26 --- yep.. although I did hit something similar while building the staging drivers for the kernel. but keep in mind this could be fixed already with the latest gcc. (I can try and see, but first need to finish up on a few jobs before going into other things) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #31 from justinmattock at gmail dot com 2010-05-08 08:02 --- o.k... took me a bit, but I got that system up and running with 4.6.0. (need more machines around here). Anyways gcc 4.6.0 builds fine with the above patch. As for the kernel I didn't see the original error, but found(I think) a new one: from include/net/sock.h:50, from include/linux/mroute.h:134, from net/ipv4/raw.c:55: include/linux/netfilter.h: In function 'raw_sendmsg': include/net/dst.h:262:19: sorry, unimplemented: inlining failed in call to 'dst_output': optimizing for size and code size would grow include/linux/netfilter.h:206:7: sorry, unimplemented: called from here -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #32 from hubicka at ucw dot cz 2010-05-08 09:23 --- Subject: Re: [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009 o.k... took me a bit, but I got that system up and running with 4.6.0. (need more machines around here). Anyways gcc 4.6.0 builds fine with the above patch. As for the kernel I didn't see the original error, but found(I think) a new one: This seems like fallout of Richards early inlining cleanup. Can you open a new PR for this one, please? Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #33 from justinmattock at gmail dot com 2010-05-08 15:33 --- o.k. here the new bug report for this new kind of error: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44043 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #22 from hubicka at gcc dot gnu dot org 2010-05-06 13:11 --- Testing the following patch. For some reason we skip updates of costs at alwaysinline callers. This is wrong. Honza Index: ipa-inline.c === --- ipa-inline.c(revision 159096) +++ ipa-inline.c(working copy) @@ -664,7 +664,7 @@ update_caller_keys (fibheap_t heap, stru struct cgraph_edge *edge; cgraph_inline_failed_t failed_reason; - if (!node-local.inlinable || node-local.disregard_inline_limits + if (!node-local.inlinable || node-global.inlined_to) return; if (bitmap_bit_p (updated_nodes, node-uid)) -- hubicka at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |hubicka at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|-00-00 00:00:00 |2010-05-06 13:11:51 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #23 from rogutes at googlemail dot com 2010-05-06 13:17 --- Justin, your comment 7 reminded me of my problem (unrelated to this bug report - sorry): 'busybox ls' and 'ninit' (didn't test SYSV 'init') segfault when booting a kernel compiled with CONFIG_CC_OPTIMIZE_FOR_SIZE=y (which means -Os). I am running gcc-4.5 on x86_64. If you could reproduce your init segfault with a stable kernel compiled with -Os by a gcc snapshot, it would mean a regression since gcc-4.4. Currently the data I have seems too vague for a bug report and I probably won't have time to test a gcc snapshot until monday. -- rogutes at googlemail dot com changed: What|Removed |Added CC||rogutes at googlemail dot ||com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #24 from rogutes at googlemail dot com 2010-05-06 13:19 --- (In reply to comment #23) Justin, your comment 7 reminded me of my problem (unrelated to this bug report Should be comment 20. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #25 from justinmattock at gmail dot com 2010-05-06 13:27 --- Subject: Re: [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009 On 05/06/2010 06:11 AM, hubicka at gcc dot gnu dot org wrote: --- Comment #22 from hubicka at gcc dot gnu dot org 2010-05-06 13:11 --- Testing the following patch. For some reason we skip updates of costs at alwaysinline callers. This is wrong. Honza Index: ipa-inline.c === --- ipa-inline.c(revision 159096) +++ ipa-inline.c(working copy) @@ -664,7 +664,7 @@ update_caller_keys (fibheap_t heap, stru struct cgraph_edge *edge; cgraph_inline_failed_t failed_reason; - if (!node-local.inlinable || node-local.disregard_inline_limits + if (!node-local.inlinable || node-global.inlined_to) return; if (bitmap_bit_p (updated_nodes, node-uid)) I'll give this a try.. keep in mind though I ended up compressing that system, and am in the process of doing something else on that machine.(so it might not be today, but I will do this). Justin P. Mattock -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #26 from justinmattock at gmail dot com 2010-05-06 13:31 --- (In reply to comment #23) Justin, your comment 7 reminded me of my problem (unrelated to this bug report - sorry): 'busybox ls' and 'ninit' (didn't test SYSV 'init') segfault when booting a kernel compiled with CONFIG_CC_OPTIMIZE_FOR_SIZE=y (which means -Os). I am running gcc-4.5 on x86_64. If you could reproduce your init segfault with a stable kernel compiled with -Os by a gcc snapshot, it would mean a regression since gcc-4.4. Currently the data I have seems too vague for a bug report and I probably won't have time to test a gcc snapshot until monday. no, no reason to be sorry..that was the initial reason for the bug report. but if building the kernel with a stable gcc snapshot(with -0s), then we have something thats been lingering for some time. (reason for having a git bisect handy); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #27 from justinmattock at gmail dot com 2010-05-06 13:44 --- (In reply to comment #24) (In reply to comment #23) Justin, your comment 7 reminded me of my problem (unrelated to this bug report Should be comment 20. ah.. oh-well.. in any case though this error is funky i.g. cgraph_decide_inlining_of_small_functions is kind of everywhere, when messing with the CFLAGS flags like that.(one minuete over here, the next over there). my main concern with this whole thing is making sure things are running as it should i.g. since building all apps/libs with 4.6.0 if some function was taken out, that's important is it safe!?(the risks of being a developer I guess),but s far I have only seen the above error, no messages in sys.log or strangeness while running the system.. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #28 from hubicka at ucw dot cz 2010-05-06 13:50 --- Subject: Re: [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009 --- Comment #27 from justinmattock at gmail dot com 2010-05-06 13:44 --- (In reply to comment #24) (In reply to comment #23) Justin, your comment 7 reminded me of my problem (unrelated to this bug report Should be comment 20. ah.. oh-well.. in any case though this error is funky i.g. cgraph_decide_inlining_of_small_functions is kind of everywhere, when messing with the CFLAGS flags like that.(one minuete over here, the next over there). Well, it is a symptom of insane use of always_inline attribute (as seen in the testcase). The function is public yet marked always inline, so compiler really can't inline it everywhere no matter how hard it is trying. We are thinking about making this invalid in future relase of GCC. Always inline functions should be static and should not be used in scenarios we can not inline into. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #29 from hubicka at gcc dot gnu dot org 2010-05-06 14:15 --- Subject: Bug 43791 Author: hubicka Date: Thu May 6 14:15:22 2010 New Revision: 159108 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159108 Log: PR tree-optimization/43791 * ipa-inline.c (update_caller_keys): Remove bogus disregard_inline_limits check. * gcc.c-torture/compile/pr43791.c: New file. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr43791.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-inline.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #30 from justinmattock at gmail dot com 2010-05-06 14:36 --- (In reply to comment #28) Subject: Re: [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009 --- Comment #27 from justinmattock at gmail dot com 2010-05-06 13:44 --- (In reply to comment #24) (In reply to comment #23) Justin, your comment 7 reminded me of my problem (unrelated to this bug report Should be comment 20. ah.. oh-well.. in any case though this error is funky i.g. cgraph_decide_inlining_of_small_functions is kind of everywhere, when messing with the CFLAGS flags like that.(one minuete over here, the next over there). Well, it is a symptom of insane use of always_inline attribute (as seen in the testcase). The function is public yet marked always inline, so compiler really can't inline it everywhere no matter how hard it is trying. We are thinking about making this invalid in future relase of GCC. Always inline functions should be static and should not be used in scenarios we can not inline into. Honza alright.. so it's nothing too serious then.. From over here, I'm not going to be able to test this patch right away.. (but will), in the meantime if somebody already has 4.6.0 setup and everything they should run your patch and see.(right now in the process of working on an issue with SELinux, then hopefully in the next few days will throw in the system with 4.6.0 and try the patch out). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #21 from hjl dot tools at gmail dot com 2010-05-06 03:57 --- *** Bug 43997 has been marked as a duplicate of this bug. *** -- hjl dot tools at gmail dot com changed: What|Removed |Added CC||dps at simpson dot demon dot ||co dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #20 from justinmattock at gmail dot com 2010-04-26 02:41 --- Created an attachment (id=20489) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20489action=view) dmesg with 4.6.0 and latest kernel(good boot). I compiled the kernel with the -01 option and ended up hitting another error: net/netfilter/ipvs/ip_vs_xmit.c: At top level: net/netfilter/ipvs/ip_vs_xmit.c:931:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. make[3]: *** [net/netfilter/ipvs/ip_vs_xmit.o] Error 1 make[2]: *** [net/netfilter/ipvs] Error 2 make[1]: *** [net/netfilter] Error 2 make: *** [net] Error 2 after turning off ip_vs the kernel compiles all the way through. attached is dmesg of running the kernel compiled with 4.6.0 (no freezes like before for whatever that was). BTW I was too lazy to find the right command to pass to the kernel so I just changed the Makefile: diff --git a/Makefile b/Makefile index 9754615..530d87c 100644 --- a/Makefile +++ b/Makefile @@ -527,9 +527,9 @@ endif # $(dot-config) all: vmlinux ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += -Os +KBUILD_CFLAGS += -O1 else -KBUILD_CFLAGS += -O2 +KBUILD_CFLAGS += -O1 endif other than the ip_vs(not even sure if I use this)everything seems o.k. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #19 from justinmattock at gmail dot com 2010-04-24 06:34 --- (In reply to comment #18) I should have been more aggressive in my searches; filed a duplicate bug report #43840. I have a small test case there that compiles fine under 4.6.0 with -O1 but fails on this bug with -O1 -finline-small-functions: typedef unsigned long int (*a)(unsigned long int *); extern __inline__ unsigned long int e(unsigned long int *d){ unsigned long int r; u(r,d); return r; } a s(a f){ return f; } int main(void){ unsigned long int b[1]; unsigned long int c; int i; for(i=0;i1;i++){ c=(*s(e))(b); c=(*s(e))(b); } return 0; } no worries over here..(I should of looked harder before filing)., anyways I can give those a try and see.. interesting thing here is this boot/crash I'm hitting.. In any case I'll give your(-O1 -finline-small-functions)and maybe other switches a try and see. I can set things up for a bisect...I just need to find the git address so I can pull the latest,then I can have a go(good/bad). Justin P. Mattock -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #18 from djdragonboy at gmail dot com 2010-04-22 18:40 --- I should have been more aggressive in my searches; filed a duplicate bug report #43840. I have a small test case there that compiles fine under 4.6.0 with -O1 but fails on this bug with -O1 -finline-small-functions: typedef unsigned long int (*a)(unsigned long int *); extern __inline__ unsigned long int e(unsigned long int *d){ unsigned long int r; u(r,d); return r; } a s(a f){ return f; } int main(void){ unsigned long int b[1]; unsigned long int c; int i; for(i=0;i1;i++){ c=(*s(e))(b); c=(*s(e))(b); } return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #17 from rguenth at gcc dot gnu dot org 2010-04-21 20:23 --- *** Bug 43840 has been marked as a duplicate of this bug. *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||djdragonboy at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #14 from rguenth at gcc dot gnu dot org 2010-04-20 08:59 --- Confirmed with the testcase from comment #8 at -O2. Breakpoint 1, fancy_abort ( file=0x1196288 /space/rguenther/src/svn/trunk/gcc/ipa-inline.c, line=1009, function=0x1196720 cgraph_decide_inlining_of_small_functions) at /space/rguenther/src/svn/trunk/gcc/diagnostic.c:811 811 internal_error (in %s, at %s:%d, function, trim_filename (file), line); (gdb) up #1 0x00c8b961 in cgraph_decide_inlining_of_small_functions () at /space/rguenther/src/svn/trunk/gcc/ipa-inline.c:1009 1009 gcc_assert (cgraph_edge_badness (edge, false) == badness); (gdb) p badness $1 = 11 (gdb) call cgraph_edge_badness (edge, 0) $2 = 12 -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Summary|kernel/rtmutex.c:1138:1:|[4.6 Regression] |internal compiler error: in |kernel/rtmutex.c:1138:1: |cgraph_decide_inlining_of_sm|internal compiler error: in |all_functions, at ipa- |cgraph_decide_inlining_of_sm |inline.c:1009 |all_functions, at ipa- ||inline.c:1009 Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #15 from justinmattock at gmail dot com 2010-04-20 09:11 --- as for the crash in early boot, I have not re-built sysvinit, and libselinux with 4.6.0.. so am unsure if it makes a difference or not(will test as soon as I wake up). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791
[Bug tree-optimization/43791] [4.6 Regression] kernel/rtmutex.c:1138:1: internal compiler error: in cgraph_decide_inlining_of_small_functions, at ipa-inline.c:1009
--- Comment #16 from justinmattock at gmail dot com 2010-04-21 01:12 --- ugh... sysvinit rebuilt(just to see), makes no difference still getting stuck during boot. libselinux breaks as well with the build. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43791