Go to file
Richard Sandiford ed0eca5e63 Don't mangle attributes that have a space in their name
The SVE port needs to maintain a different type identity for
GNU vectors and "SVE vectors" even during LTO, since the types
use different ABIs.  The easiest way of doing that seemed to be
to use type attributes.  However, these type attributes shouldn't
be user-facing; they're just a convenient way of representing the
types internally in GCC.

There are already several internal-only attributes, such as "fn spec"
and "omp declare simd".  They're distinguished from normal user-facing
attributes by having a space in their name, which means that it isn't
possible to write them directly in C or C++.

Taking the same approach mostly works well for SVE.  The only snag
I've hit so far is that the new attribute needs to (and only exists to)
affect type identity.  This means that it would normally get included
in mangled names, to distinguish it from types without the attribute.

However, the SVE ABI specifies a separate mangling for SVE vector types,
rather than using an attribute mangling + a normal vector mangling.
So we need some way of suppressing the attribute mangling for this case.

There are currently no other target-independent or target-specific
internal-only attributes that affect type identity, so this patch goes
for the simplest fix of skipping mangling for attributes whose names
contain a space.  Other options I thought about were:

(1) Also make sure that targetm.mangled_type returns nonnull.

(2) Check directly for the target-specific name.

(3) Add a new target hook.

(4) Add new information to attribute_spec.  This would be very invasive
    at this stage, but maybe we should consider replacing all the boolean
    fields with flags?  That should make the tables slightly easier to
    read and would make adding new flags much simpler in future.

2019-12-19  Richard Sandiford  <richard.sandiford@arm.com>

gcc/cp/
	* mangle.c (write_CV_qualifiers_for_type): Don't mangle attributes
	that contain a space.

From-SVN: r279569
2019-12-19 13:21:54 +00:00
config
contrib MSP430: Add new msp430-elfbare target 2019-12-16 11:02:10 +00:00
fixincludes
gcc Don't mangle attributes that have a space in their name 2019-12-19 13:21:54 +00:00
gnattools
gotools
include Add OpenACC 2.6's no_create 2019-12-19 00:10:08 +01:00
INSTALL
intl
libada
libatomic
libbacktrace libbacktrace: add DWARF 5 support 2019-12-13 20:04:47 +00:00
libcc1 typeck.c (cxx_sizeof_or_alignof_type): Add location_t parameter and use it throughout. 2019-12-18 19:23:01 +00:00
libcpp Drop unused member from cpp_string_location_reader (PR preprocessor/92982) 2019-12-18 17:26:01 +00:00
libdecnumber Fix libdecnumber handling of non-canonical BID significands (PR middle-end/91226). 2019-12-09 13:59:24 +00:00
libffi
libgcc MSP430: Add new msp430-elfbare target 2019-12-16 11:02:10 +00:00
libgfortran re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output) 2019-12-01 22:29:43 +00:00
libgo re PR go/92861 (Passes relative time to sem_timedwait on GNU/Hurd) 2019-12-09 18:03:53 +00:00
libgomp re PR middle-end/86416 ([OpenMP] Offloading - better lto1 error message if mode not supported on offloading target) 2019-12-19 00:27:28 +01:00
libhsail-rt
libiberty Fix read buffer overflow in split_directories 2019-12-06 15:20:06 -07:00
libitm musl: Fix invalid tls model in libgomp and libitm PR91938 2019-12-03 11:13:38 +00:00
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: Simplify std::common_comparison_category 2019-12-12 14:35:55 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Add myself to write after approval. 2019-12-17 14:19:22 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in MSP430: Add -fno-exceptions multilib 2019-12-11 19:19:50 +00:00
config.guess
config.rpath
config.sub
configure configure.ac: Factor out common cases for compare_exclusions. 2019-12-11 20:59:35 +00:00
configure.ac configure.ac: Factor out common cases for compare_exclusions. 2019-12-11 20:59:35 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Add myself to write after approval. 2019-12-17 14:19:22 +00:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
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.