https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80091
Bug ID: 80091 Summary: gcc from gcc-6 branch segfaults while compiling firefox Product: gcc Version: 6.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: me at hussam dot eu.org Target Milestone: --- 6.3 20160309 snapshot works fine but latest git from gcc-6 branch results in an internal compiler error: /usr/bin/g++ -std=gnu++11 -o Unified_cpp_dom_presentation0.o -c -I/home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I/home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /home/hussam/cache/firefox/src/gecko-dev/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/home/hussam/cache/firefox/src/gecko-dev/dom/presentation -I/home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/presentation -I/home/hussam/cache/firefox/src/gecko-dev/dom/base -I/home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/home/hussam/cache/firefox/src/gecko-dev/ipc/chromium/src -I/home/hussam/cache/firefox/src/gecko-dev/ipc/glue -I/home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/mozilla-config.h -MD -MP -MF .deps/Unified_cpp_dom_presentation0.o.pp -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -Os -fomit-frame-pointer /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/presentation/Unified_cpp_dom_presentation0.cpp In file included from /home/hussam/cache/firefox/src/gecko-dev/dom/base/nsINode.h:19:0, from /home/hussam/cache/firefox/src/gecko-dev/dom/base/nsIDocument.h:17, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/BindingUtils.h:33, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/ToJSValue.h:12, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/EventListenerBinding.h:12, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/EventListenerManager.h:11, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/DOMEventTargetHelper.h:19, from /home/hussam/cache/firefox/src/gecko-dev/dom/presentation/PresentationAvailability.h:10, from /home/hussam/cache/firefox/src/gecko-dev/dom/presentation/AvailabilityCollection.cpp:10, from /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dom/presentation/Unified_cpp_dom_presentation0.cpp:2: /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsTObserverArray.h: In lambda function: /home/hussam/cache/firefox/src/gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/nsTObserverArray.h:260:30: internal compiler error: Segmentation fault AdjustIterators(i, -1); ^ lines around 260 in /nsTObserverArray.h : // See nsTArray::RemoveElementsBy. void RemoveElementsBy(std::function<bool(const elem_type&)> aPredicate) { index_type i = 0; mArray.RemoveElementsBy([&](const elem_type& aItem) { if (aPredicate(aItem)) { // This element is going to be removed. AdjustIterators(i, -1); return true; } ++i; return false; }); }