http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51662
Bug #: 51662 Summary: Temporary objects gets garbage collected in cc1 Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: m...@duempel.org Created attachment 26170 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26170 Workaround After rebasing cegcc/mingw32ce on gcc 4.6.2, I found cc1 crashing. locate_fn_flags() creates an object "ob" that is not yet inserted into the root tree, and lookup_fnfields() eventually causes a garbage collection. This may kill the page where "ob" lives in, causing a segmentation fault. I found a kludge to work around it: I increase function_depth to inhibit garbage collection. See attached patch. Another idea would be to call lookup_fnfields() before allocating "ob", but since I don't know the code base, I don't know if this is safe. Also note that this may or may not be caused / triggered by cegcc specific patches. Just in case you want to review these: http://git.xcsoar.org/cgit/max/cegcc-gcc.git/log/?h=ice