https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67504
Bug ID: 67504 Summary: ICE with type dependent collapse argument Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- int bar (int); double bar (double); template <typename T> void foo (T x) { #pragma omp for collapse (bar (x)) // { dg-error "collapse argument needs positive constant integer expression" } for (int i = 0; i < 10; i++) ; } ICEs during the testing, we should check for tree_fits_shwi_p first before testing INTEGRAL_TYPE_P.