Iain Buclaw 9fadadbbbc d: Fix error with -Warray-bounds and -O2 [PR117002]
The record layout of class types in D don't get any tail padding, so it
is possible for the `classInstanceSize' to not be a multiple of the
`classInstanceAlignment'.

Rather than setting the instance alignment on the underlying
RECORD_TYPE, instead give the type an alignment of 1, which will mark it
as TYPE_PACKED.  The value of `classInstanceAlignment' is instead
applied to the DECL_ALIGN of both the static `init' symbol, and the
stack allocated variable used when generating `new' for a `scope' class.

	PR d/117002

gcc/d/ChangeLog:

	* decl.cc (aggregate_initializer_decl): Set explicit decl alignment of
	class instance.
	* expr.cc (ExprVisitor::visit (NewExp *)): Likewise.
	* types.cc (TypeVisitor::visit (TypeClass *)): Mark the record type of
	classes as packed.

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/pr117002.d: New test.
2025-03-31 19:15:33 +02:00
2025-01-02 11:59:57 +01:00
2024-11-26 00:19:26 +00:00
2025-03-28 00:19:00 +00:00
2024-07-12 00:17:52 +00:00
2025-03-26 00:17:07 +00:00
2024-04-16 00:18:06 +00:00
2025-03-30 00:16:46 +00:00
2025-01-02 11:59:57 +01:00
2025-01-11 00:19:49 +00:00
2025-02-11 00:17:27 +00:00
2025-01-02 11:59:57 +01:00
2025-03-29 00:17:59 +00:00
2025-01-02 11:59:57 +01:00
2024-10-26 00:19:39 +00:00
2025-03-23 00:17:38 +00:00
2025-03-29 00:17:59 +00:00
2025-03-23 00:17:38 +00:00
2025-03-29 00:17:59 +00:00
2025-03-27 00:19:18 +00:00
2025-03-18 00:19:44 +00:00
2025-03-30 00:16:46 +00:00
2025-01-03 00:17:15 +00:00
2025-01-02 11:59:57 +01:00
2025-03-23 00:17:38 +00:00
2025-01-03 00:17:15 +00:00
2025-01-07 00:18:08 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-03-07 00:17:19 +00:00
2023-10-23 00:16:43 +00:00
2025-03-29 00:17:59 +00:00
2025-03-23 16:24:36 -04:00
2024-11-19 12:27:33 +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.
Description
No description provided
Readme 1.5 GiB
Languages
C++ 30.7%
C 30%
Ada 14.5%
D 6.1%
Go 5.7%
Other 12.5%