https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79650
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This used to be rejected: /opt/notnfs/gcc-bisect/obj/gcc/cc1plus.174880 -quiet -std=c++0x pr79650.C pr79650.C: In function ‘void foo()’: pr79650.C:8:47: error: conversion of expression ‘&& M’ of pointer type cannot yield a constant expression pr79650.C:8:48: error: template argument 1 is invalid pr79650.C:8:51: error: invalid type in declaration before ‘;’ token then it turned into error-recovery ICE (dunno exactly, maybe r174882 or r174883): /opt/notnfs/gcc-bisect/obj/gcc/cc1plus.174891 -quiet -std=c++0x pr79650.C pr79650.C: In function ‘void foo()’: pr79650.C:8:47: error: conversion of expression ‘&& M’ of pointer type cannot yield a constant expression pr79650.C:8:48: internal compiler error: in convert_nontype_argument, at cp/pt.c:5410 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. and finally it is ice-on-invalid-code: /opt/notnfs/gcc-bisect/obj/gcc/cc1plus.182470 -quiet -std=c++0x pr79650.C pr79650.C: In function ‘void foo()’: pr79650.C:8:48: internal compiler error: in convert_nontype_argument, at cp/pt.c:5818 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. likely starting with r182470. I think we need to reject subtraction of LABEL_DECLs perhaps cast to some other type, unless they are the same.