https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85472
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> --- My bad, I didn't realize that "(z)((a+)?(b+)?(c))*" is exactly an example described in ECMAScript third edition 15.10.2.5. Therefore libstdc++ is not conforming.