Go to file
Marek Polacek 29d8838c5e c++: ICE with concept defined in function [PR97536]
This is an ICE-on-invalid, but I keep seeing it when reducing code so
I'd like to fix it.  We crash on

  template <typename> void forward() {
    concept C = true;
  }

which breaks two requirements:
[temp.concept]/1: A concept is a template ...
[temp.concept]/3: A concept-definition shall inhabit a namespace scope.

This patch adds a test that exercises broken code and fixes the ICE
by checking that a concept-definition is defined at namespace scope.

gcc/cp/ChangeLog:

	PR c++/97536
	* decl.c (grokvardecl): Given an error when a concept is not defined
	at namespace scope.

gcc/testsuite/ChangeLog:

	PR c++/97536
	* g++.dg/concepts/diagnostic16.C: New test.
2021-04-19 16:35:00 -04:00
INSTALL
c++tools Daily bump. 2021-04-02 00:16:26 +00:00
config Daily bump. 2021-04-14 00:16:24 +00:00
contrib Daily bump. 2021-04-13 00:16:21 +00:00
fixincludes
gcc c++: ICE with concept defined in function [PR97536] 2021-04-19 16:35:00 -04:00
gnattools
gotools
include Daily bump. 2021-04-01 00:16:39 +00:00
intl Daily bump. 2021-04-17 00:16:25 +00:00
libada
libatomic
libbacktrace Daily bump. 2021-03-04 00:16:48 +00:00
libcc1
libcody Daily bump. 2021-04-07 00:16:39 +00:00
libcpp preprocessor/100142 - revert unwanted change in last commit 2021-04-19 14:43:39 +02:00
libdecnumber
libffi
libgcc Daily bump. 2021-04-06 00:16:43 +00:00
libgfortran Daily bump. 2021-03-13 00:16:20 +00:00
libgo libgo: update to Go1.16.3 release 2021-04-12 15:23:16 -07:00
libgomp [OpenACC 'kernels'] '-fopenacc-kernels=[...]' -> '--param=openacc-kernels=[...]' 2021-04-19 14:29:48 +02:00
libhsail-rt
libiberty Daily bump. 2021-04-01 00:16:39 +00:00
libitm
libobjc
liboffloadmic
libphobos libphobos: Merge upstream druntime 89f870b7, phobos e6907ff3e 2021-04-19 19:27:41 +02:00
libquadmath
libsanitizer Daily bump. 2021-04-18 00:16:21 +00:00
libssp
libstdc++-v3 libstdc++: Update some baseline_symbols.txt (x32) 2021-04-19 05:06:31 -07:00
libvtv
lto-plugin
maintainer-scripts Daily bump. 2021-04-10 00:16:23 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Daily bump. 2021-04-12 00:16:27 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Add myself for write after approval 2021-04-11 12:09:11 +01:00
Makefile.def sim: drop dep on configure-gdb 2021-03-12 19:48:13 -05:00
Makefile.in sim: drop dep on configure-gdb 2021-03-12 19:48:13 -05:00
Makefile.tpl Add -fprofile-reproducible=parallel-runs to STAGEfeedback_CFLAGS to Makefile.tpl. 2021-03-11 16:18:56 +01:00
README
ar-lib
compile
config-ml.in
config.guess config.sub, config.guess : Import upstream 2021-01-25. 2021-02-23 17:21:10 +08:00
config.rpath
config.sub config.sub, config.guess : Import upstream 2021-01-25. 2021-02-23 17:21:10 +08:00
configure
configure.ac
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.