No description
  • C++ 30.7%
  • C 30.2%
  • Ada 14.3%
  • D 6.1%
  • Go 5.7%
  • Other 12.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Marek Polacek ea80d5b13d c++/reflection: crash with can_substitute and fn returning ref [PR125764]
Here we crash in convert_from_reference because it gets a FUNCTION_TYPE
int&().  Since its return type is a reference, it passes the c_f_r check:

  if (TREE_TYPE (val)
      && TYPE_REF_P (TREE_TYPE (val)))

and we crash inside that block.

The call isn't needed since r17-1271:

  return convert_nontype_argument (type, convert_from_reference (arg),
                  complain);

but we can also avoid calling it on TYPE_P because the function is meant
for expressions only.

	PR c++/125764

gcc/cp/ChangeLog:

	* reflect.cc (eval_can_substitute): Don't call
	convert_from_reference on types.

gcc/testsuite/ChangeLog:

	* g++.dg/reflect/can_substitute3.C: New test.

Reviewed-by: Patrick Palka <ppalka@redhat.com>
2026-06-17 17:43:36 -04:00
.forgejo forge: Add a prototype CODEOWNERS file 2026-06-05 17:58:58 +01:00
.github
c++tools Update copyright years. 2026-01-02 09:56:11 +01:00
config Daily bump. 2026-05-06 00:16:29 +00:00
contrib Daily bump. 2026-06-09 08:53:25 +00:00
fixincludes Daily bump. 2026-05-31 00:16:35 +00:00
gcc c++/reflection: crash with can_substitute and fn returning ref [PR125764] 2026-06-17 17:43:36 -04:00
gnattools Daily bump. 2026-05-11 00:16:22 +00:00
gotools
include Daily bump. 2026-06-14 00:16:28 +00:00
INSTALL
libada Update copyright years. 2026-01-02 09:56:11 +01:00
libatomic libatomic: Mark AArch64 asm features with build attributes 2026-06-17 13:28:57 +00:00
libbacktrace Daily bump. 2026-06-04 08:18:58 +00:00
libcc1 Daily bump. 2026-01-16 00:16:30 +00:00
libcody Daily bump. 2026-05-31 00:16:35 +00:00
libcpp Daily bump. 2026-06-17 00:16:32 +00:00
libdecnumber Daily bump. 2026-05-31 00:16:35 +00:00
libffi libffi: Update LOCAL_PATCHES 2026-06-17 13:34:45 +00:00
libga68 Daily bump. 2026-05-31 00:16:35 +00:00
libgcc libgcc: Mark AArch64 asm features with build attributes 2026-06-17 13:28:57 +00:00
libgcobol Daily bump. 2026-06-17 00:16:32 +00:00
libgfortran Daily bump. 2026-06-12 00:16:30 +00:00
libgm2 Daily bump. 2026-06-02 00:16:46 +00:00
libgo libgo: cmd/go: use 'gcloud storage cp' instead of 'gsutil cp' 2026-05-02 16:21:35 -07:00
libgomp Daily bump. 2026-06-13 00:16:30 +00:00
libgrust Update copyright years. 2026-01-02 09:56:11 +01:00
libiberty Daily bump. 2026-06-14 00:16:28 +00:00
libitm libitm: Mark AArch64 asm features with build attributes 2026-06-17 13:28:57 +00:00
libobjc Update copyright years. 2026-01-02 09:56:11 +01:00
libphobos Daily bump. 2026-04-22 00:16:28 +00:00
libquadmath Daily bump. 2026-05-31 00:16:35 +00:00
libsanitizer Daily bump. 2026-06-04 08:18:58 +00:00
libssp Daily bump. 2026-05-06 00:16:29 +00:00
libstdc++-v3 libstdc++: adjust explicit inst of std::basic_string::data() 2026-06-17 11:00:57 -04:00
libvtv Daily bump. 2026-05-31 00:16:35 +00:00
lto-plugin Daily bump. 2026-06-14 00:16:28 +00:00
maintainer-scripts Daily bump. 2026-04-23 00:16:32 +00:00
zlib Daily bump. 2025-12-30 00:16:33 +00:00
.b4-config Add config file so b4 uses inbox.sourceware.org automatically 2024-07-28 11:13:16 +01:00
.dir-locals.el dir-locals: apply our C settings in C++ also 2024-07-31 20:38:27 +02:00
.editorconfig Configure EditorConfig for Git commit messages 2026-05-15 23:32:16 +00:00
.gitattributes
.gitignore Rust: Move 'libformat_parser' build into the GCC build directory 2025-08-05 16:36:43 +02:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2026-06-11 00:16:32 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in toplevel: Unbreak Ada build [PR123490] 2026-01-10 11:36:25 +01:00
config.guess
config.rpath
config.sub
configure [PATCH v2 2/2] build: Set default for CPP_FOR_BUILD environment variable in all cases. 2026-05-01 11:39:05 -06:00
configure.ac [PATCH v2 2/2] build: Set default for CPP_FOR_BUILD environment variable in all cases. 2026-05-01 11:39:05 -06:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 build: Cherry-pick libtool.m4 support for GNU ld *_sol2 emulations 2025-12-29 12:09:35 +01:00
ltgcc.m4
ltmain.sh ltmain.sh: allow more flags at link-time 2024-09-25 19:05:24 +01:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself to write after approval. 2026-06-10 16:23:13 +02:00
Makefile.def toplevel: Fix typos in build files 2026-05-30 19:49:31 +05:30
Makefile.in toplevel: Fix typos in build files 2026-05-30 19:49:31 +05:30
Makefile.tpl toplevel: Fix typos in build files 2026-05-30 19:49:31 +05:30
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
SECURITY.txt a68: top-level misc files 2025-11-30 01:52:24 +01:00
symlink-tree bugzilla: remove gcc-bugs@ mailing list address 2026-01-09 11:10:38 +01:00
test-driver
ylwrap

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.