https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93179
Bug ID: 93179 Summary: [10 Regression] ICE (segfault) in loop_depth on x86_64-linux-gnu Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: doko at debian dot org Target Milestone: --- seen with trunk r279880, building icu 63.2 on x86_64-linux-gnu (no other archs), compiler defaulting to hardening defaults. fails with -O1, works with -O0. The example isn't completely reduced, however further creduce attempts are timing out after 300 seconds. $ cat dtfmttst.ii class UnicodeString { public: enum EInvariant {}; UnicodeString(char ); ~UnicodeString(); private: public: }; class DateFormat : UnicodeString { public: enum EStyle { kNone}; }; UnicodeString CharsToUnicodeString(const char *); class DateFormatTest { void TestNonGregoFmtParse(); public: private: private: }; typedef struct { int era; int year; int month; int day; int hour; int minute; UnicodeString formattedDate; } CalAndFmtTestItem; typedef struct { const char *locale; DateFormat::EStyle style; UnicodeString pattern; const CalAndFmtTestItem *caftItems; } TestNonGregoItem; void DateFormatTest::TestNonGregoFmtParse() { CalAndFmtTestItem cafti_zh_chinese_custU[] {78, 31, 0, 1, 12, 0, 0}; TestNonGregoItem items[] {"zh@calendar=chinese", DateFormat::kNone, CharsToUnicodeString("rU\\u5E74MMMd"), cafti_zh_chinese_custU}; TestNonGregoItem *itemPtr; for (itemPtr = items; itemPtr->locale != __null; itemPtr++) ; } $ g++ -c -std=c++11 -Wall -Wextra -Wpedantic -O1 dtfmttst.ii during GIMPLE pass: profile_estimate dtfmttst.ii: In member function 'void DateFormatTest::TestNonGregoFmtParse()': dtfmttst.ii:46:1: internal compiler error: Segmentation fault 46 | } | ^ 0xbfef43 crash_signal ../../src/gcc/toplev.c:328 0x81d8e6 loop_depth ../../src/gcc/cfgloop.h:529 0x81d8e6 flow_loop_nested_p(loop const*, loop const*) ../../src/gcc/cfgloop.c:66 0x81d8e6 flow_bb_inside_loop_p(loop const*, basic_block_def const*) ../../src/gcc/cfgloop.c:859 0x81d8e6 flow_bb_inside_loop_p(loop const*, basic_block_def const*) ../../src/gcc/cfgloop.c:850 0xd13f34 chain_of_csts_start ../../src/gcc/tree-ssa-loop-niter.c:2883 0xd15764 get_base_for ../../src/gcc/tree-ssa-loop-niter.c:2932 0xd15764 loop_niter_by_eval(loop*, edge_def*) ../../src/gcc/tree-ssa-loop-niter.c:3055 0xb5daed predict_loops ../../src/gcc/predict.c:1988 0xb5eeae tree_estimate_probability(bool) ../../src/gcc/predict.c:3096 0xb5f073 execute ../../src/gcc/predict.c:4034 0xb5f073 execute ../../src/gcc/predict.c:4017 Please submit a full bug report, with preprocessed source if appropriate.