Iain Buclaw 0f54a73b99 d: Suboptimal codegen for __builtin_expect(cond, false)
Since PR96435, both boolean objects and expressions have been evaluated
in the following way.

    (*(ubyte*)&obj_or_expr) & 1

It has been noted that sometimes this can cause the back-end to optimize
in non-obvious ways - in particular with __builtin_expect.

This @safe feature is now restricted to just when reading the value of a
bool field that comes from a union.

	PR d/110359

gcc/d/ChangeLog:

	* d-convert.cc (convert_for_rvalue): Only apply the @safe boolean
	conversion to boolean fields of a union.
	(convert_for_condition): Call convert_for_rvalue in the default case.

gcc/testsuite/ChangeLog:

	* gdc.dg/pr110359.d: New test.

(cherry picked from commit ab98db1e8c)
2023-06-26 03:32:13 +02:00
2023-05-10 00:22:01 +00:00
2023-05-22 00:20:36 +00:00
2023-06-07 00:21:41 +00:00
2023-05-22 00:20:36 +00:00
2023-06-24 00:20:02 +00:00
2021-12-21 09:10:57 +01:00
2022-03-29 17:43:32 +08: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%