Iain Buclaw 3f43c19d0d d: Fix accesses of immutable arrays using constant index still bounds checked
Starts setting TREE_READONLY against specific kinds of VAR_DECLs, so
that the middle-end/optimization passes can more aggressively constant
fold D code that makes use of `immutable' or `const'.

	PR d/110514

gcc/d/ChangeLog:

	* decl.cc (get_symbol_decl): Set TREE_READONLY on certain kinds of
	const and immutable variables.
	* expr.cc (ExprVisitor::visit (ArrayLiteralExp *)): Set TREE_READONLY
	on immutable dynamic array literals.

gcc/testsuite/ChangeLog:

	* gdc.dg/pr110514a.d: New test.
	* gdc.dg/pr110514b.d: New test.
	* gdc.dg/pr110514c.d: New test.
	* gdc.dg/pr110514d.d: New test.

(cherry picked from commit 61b1c562f8c703bff045e91257120e42b7fae523)
2023-07-02 01:19:19 +02:00
2023-04-27 00:21:18 +00:00
2023-04-27 00:21:18 +00:00
2023-05-10 00:22:50 +00:00
2023-05-07 00:21:31 +00:00
2023-06-04 00:20:45 +00:00
2023-06-29 00:21:39 +00:00
2023-06-29 00:21:39 +00:00
2023-06-26 00:20:36 +00:00
2023-06-30 00:21:39 +00:00
2022-07-19 17:07:04 +03:00
2021-12-21 09:10:57 +01:00

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.
S
Description
Yggdrasil port of the GNU Compiler Collection
Readme 978 MiB
Languages
C++ 33%
C 27.4%
Ada 13%
Go 7.1%
D 7%
Other 12.1%