https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68586
Bug ID: 68586 Summary: [6 Regression] Enum template parameter wrongly rejected Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following valid code snippet is wrongly rejected on trunk (6.0.0 20151122): ==================================== enum E { x = 1, y = x << 1 }; template<E> struct A {}; A<x> a; ==================================== bug.cc:5:4: error: invalid conversion from 'int' to 'E' [-fpermissive] A<x> a; ^ During reduction from a larger testcase I had to tweak the settings of the garbage collector (--param ggc-min-expand=0) to make it appear reliably.