Commit Graph

1133 Commits

Author SHA1 Message Date
GCC Administrator 25b6bfea5f Daily bump. 2021-07-01 00:16:41 +00:00
GCC Administrator c8abc2058e Daily bump. 2021-06-29 00:16:42 +00:00
GCC Administrator 28c6247505 Daily bump. 2021-06-06 00:16:22 +00:00
GCC Administrator cfe82a0cbe Daily bump. 2021-05-07 00:16:33 +00:00
GCC Administrator 99e8df7a4c Daily bump. 2021-05-05 00:16:54 +00:00
GCC Administrator e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
GCC Administrator c1ef0c9234 Daily bump. 2021-04-22 00:16:32 +00:00
GCC Administrator 95d217ab52 Daily bump. 2021-04-01 00:16:39 +00:00
GCC Administrator bc2127767a Daily bump. 2021-03-17 00:16:25 +00:00
GCC Administrator b2a55cafa8 Daily bump. 2021-02-21 00:16:18 +00:00
GCC Administrator 50352c6cd2 Daily bump. 2021-02-20 00:16:26 +00:00
GCC Administrator f7884fb176 Daily bump. 2021-02-02 00:16:23 +00:00
GCC Administrator 7e73f51157 Daily bump. 2021-01-05 00:16:42 +00:00
GCC Administrator 077fefbfae Daily bump. 2020-12-23 00:16:35 +00:00
GCC Administrator 1a5e728a54 Daily bump. 2020-12-22 00:16:23 +00:00
GCC Administrator 360258daf5 Daily bump. 2020-11-26 00:16:41 +00:00
GCC Administrator 77f67db2a4 Daily bump. 2020-11-14 00:16:38 +00:00
GCC Administrator 0f5f9ed5e5 Daily bump. 2020-11-12 00:16:39 +00:00
GCC Administrator 2bee28dd41 Daily bump. 2020-11-10 00:16:24 +00:00
GCC Administrator 8e97b9052d Daily bump. 2020-10-07 00:16:35 +00:00
GCC Administrator a2b7397b50 Daily bump. 2020-09-25 00:16:27 +00:00
GCC Administrator 31a0504624 Daily bump. 2020-09-09 00:16:29 +00:00
GCC Administrator 57ea089421 Daily bump. 2020-08-27 00:16:27 +00:00
GCC Administrator 6a1ad710ad Daily bump. 2020-08-04 00:16:24 +00:00
GCC Administrator d48cca8f21 Daily bump. 2020-07-31 00:16:26 +00:00
GCC Administrator 8ca07a3072 Daily bump. 2020-07-15 00:16:35 +00:00
GCC Administrator 865362954f Daily bump. 2020-07-11 00:16:31 +00:00
GCC Administrator c9c05f7323 Daily bump. 2020-06-27 00:16:24 +00:00
GCC Administrator 4543acc874 Daily bump. 2020-06-24 00:16:31 +00:00
GCC Administrator 885ef72f27 Daily bump. 2020-05-30 00:16:27 +00:00
Iain Buclaw 3a55774f0b libiberty: Handle @live attribute in D demangler.
Adds support for demangling D functions annotated with the new
ownership/borrowing system attribute.

libiberty/ChangeLog:

	* d-demangle.c (dlang_attributes): Add @live attribute.
	* testsuite/d-demangle-expected: Add new tests.
2020-05-15 10:40:47 +02:00
Iain Buclaw 3f30a27491 libiberty: Update D symbol demangling for latest ABI spec.
Some small improvements and clarifications have been done in the D ABI
specification to remove all ambiguities found in the current grammar,
this implementation now more closely resembles the spec, whilst
maintaining compatibility with the old ABI.

Three new rules have been added to the ABI.

1. Back references using 'Q', analogous to C++ substitutions, compresses
   repeated identifiers, types, and template symbol and value parameters.

2. Template aliases to externally mangled symbols are prefixed with 'X'.
   This includes any symbol that isn't extern(D), or has its name
   overriden with pragma(mangle).  This fixes an ambiguity where it was
   not clear whether 'V' was an encoded calling convention, or the next
   template value parameter.

3. Alias parameters, templates, and tuple symbols no longer encode the
   symbol length of its subpart.  Tuples are now terminated with 'Z'.
   This fixes another ambiguity where the first character of the mangled
   name can be a digit as well, so the demangler had to figure out where
   to split the two adjacent numbers by trying out each combination.

libiberty/ChangeLog:

	* d-demangle.c (enum dlang_symbol_kinds): Remove enum.
	(struct dlang_info): New struct
	(dlang_decode_backref): New function.
	(dlang_backref): New function.
	(dlang_symbol_backref): New function.
	(dlang_type_backref): New function.
	(dlang_symbol_name_p): New function.
	(dlang_function_type_noreturn): New function.
	(dlang_function_type): Add 'info' parameter.  Decode function type
	with dlang_function_type_noreturn.
	(dlang_function_args): Add 'info' parameter.
	(dlang_type): Add 'info' parameter.  Handle back referenced types.
	(dlang_identifier): Replace 'kind' parameter with 'info'.  Handle back
	referenced symbols.  Split off decoding of plain identifiers to...
	(dlang_lname): ...here.
	(dlang_parse_mangle): Replace 'kind' parameter with 'info'.  Decode
	function type and return with dlang_type.
	(dlang_parse_qualified): Replace 'kind' parameter with 'info', add
	'suffix_modifier' parameter.  Decode function type with
	dlang_function_type_noreturn.
	(dlang_parse_tuple): Add 'info' parameter.
	(dlang_template_symbol_param): New function.
	(dlang_template_args): Add 'info' parameter.  Decode symbol parameter
	with dlang_template_symbol_param.  Handle back referenced values, and
	externally mangled parameters.
	(dlang_parse_template): Add 'info' parameter.
	(dlang_demangle_init_info): New function.
	(dlang_demangle): Initialize and pass 'info' parameter.
	* testsuite/d-demangle-expected: Add new tests.

Co-Authored-By: Rainer Schuetze <r.sagitario@gmx.de>
2020-05-14 23:43:17 +02:00
H.J. Lu d17cdc17c9 Enable CET in cross compiler if possible
Don't perform CET run-time check for host when cross compiling.  Instead,
enable CET in cross compiler if possible so that it will run on both CET
and non-CET hosts.

config/

	PR bootstrap/94998
	* cet.m4 (GCC_CET_HOST_FLAGS): Enable CET in cross compiler if
	possible.

libiberty/

	PR bootstrap/94998
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/94998
	* configure: Regenerated.
2020-05-12 10:39:54 -07:00
H.J. Lu eedc73a224 Check whether -fcf-protection=none -Wl,-z,ibt,-z,shstk work first
GCC_CET_HOST_FLAGS uses -Wl,-z,ibt,-z,shstk to check if Linux/x86 host
has Intel CET enabled by introducing an Intel CET violation on purpose.
To avoid false positive, check whether -Wl,-z,ibt,-z,shstk works first.
-fcf-protection=none is added to avoid false negative when -fcf-protection
is enabled by default.

config/

	PR bootstrap/94739
	* cet.m4 (GCC_CET_HOST_FLAGS): Add -fcf-protection=none to
	-Wl,-z,ibt,-z,shstk.  Check whether -fcf-protection=none
	-Wl,-z,ibt,-z,shstk works first.

libiberty/

	PR bootstrap/94739
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/94739
	* configure: Regenerated.
2020-04-28 05:42:50 -07:00
Jakub Jelinek 76458c912b demangler: Handle <=> operator in the demangler [PR94797]
The demangler didn't handle spaceship operator.

2020-04-27  Jakub Jelinek  <jakub@redhat.com>

	PR demangler/94797
	* cp-demangle.c (cplus_demangle_operators): Add ss <=> operator.
	* testsuite/demangle-expected: Add operator<=> test.
2020-04-27 20:59:25 +02:00
H.J. Lu 8fc8bf801e Enable Intel CET in liblto_plugin.so on Intel CET enabled host
Since ld is Intel CET enabled on Intel CET enabled host, dlopen fails on
liblto_plugin.so if it isn't Intel CET enabled.  Add GCC_CET_HOST_FLAGS
to cet.m4, use it in libiberty and lto-plugin to always enable Intel
CET in liblto_plugin.so on Intel CET enabled host.

On Linux/x86 host, enable Intel CET by default if assembler and compiler
support Intel CET so that the generated liblto_plugin.so can be used on
both CET and non-CET machines.  It is an error to disable Intel CET in
liblto_plugin.so on Intel CET enabled host.

config/

	PR bootstrap/94739
	* cet.m4 (GCC_CET_HOST_FLAGS): New.

libiberty/

	PR bootstrap/94739
	* Makefile.in (COMPILE.c): Add @CET_HOST_FLAGS@.
	(configure_deps): Add $(srcdir)/../config/cet.m4 and
	$(srcdir)/../config/enable.m4.
	* aclocal.m4: Include ../config/cet.m4 and ../config/enable.m4.
	* configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
	AC_SUBST(CET_HOST_FLAGS).
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/94739
	* Makefile.am (AM_CFLAGS): Add $(CET_HOST_FLAGS).
	* configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
	AC_SUBST(CET_HOST_FLAGS).
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
2020-04-25 10:07:16 -07:00
Richard Biener c9f90a25d4 Keep .GCC.command.line sections of LTO objetcs
This patch is for .GCC.command.line sections in LTO objects to be copied
into the final objects as in the following example:

[egeyar@localhost lto]$ gcc -flto -O3 demo.c -c -g --record-gcc-command-line
[egeyar@localhost lto]$ gcc -flto -O2 demo2.c -c -g --record-gcc-command-line -DFORTIFY=2
[egeyar@localhost lto]$ gcc demo.o demo2.o -o a.out
[egeyar@localhost lto]$ readelf -p .GCC.command.line a.out

String dump of section '.GCC.command.line':
  [     0]  10.0.1 20200227 (experimental) : gcc -flto -O3 demo.c -c -g --record-gcc-command-line
  [    56]  10.0.1 20200227 (experimental) : gcc -flto -O2 demo2.c -c -g --record-gcc-command-line -DFORTIFY=2

2020-03-05  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>

	* simple-object.c (handle_lto_debug_sections): Name
	".GCC.command.line" among debug sections to be copied over
	from lto objects.
2020-03-05 08:44:11 +01:00
Nick Clifton 3bb6abbf4b Fix a libiberty testsuite failure
* testsuite/demangle-expected: Update expected demangling of
	enable_if pattern.
2020-03-02 03:50:34 -08:00
H.J. Lu 577350603a lto: Also copy .note.gnu.property section
When generating the separate file with LTO debug sections, we should
also copy .note.gnu.property section.

	PR lto/93966
	* simple-object.c (handle_lto_debug_sections): Also copy
	.note.gnu.property section.
2020-03-02 03:09:08 -08:00
Sandra Loosemore 02ce382cd3 Use a non-empty test program to test ability to link.
On bare-metal targets, I/O support is typically provided by a BSP and
requires a linker script and/or hosting library to be specified on the
linker command line.  Linking an empty program with the default linker
script may succeed, however, which confuses libstdc++ configuration
when programs that probe for the presence of various I/O features fail
with link errors.

2020-02-12  Sandra Loosemore  <sandra@codesourcery.com>

	PR libstdc++/79193
	PR libstdc++/88999

	config/
	* no-executables.m4: Use a non-empty program to test for linker
	support.

	libgcc/
	* configure: Regenerated.

	libgfortran/
	* configure: Regenerated.

	libiberty/
	* configure: Regenerated.

	libitm/
	* configure: Regenerated.

	libobjc/
	* configure: Regenerated.

	libquadmath/
	* configure: Regenerated.

	libssp/
	* configure: Regenerated.

	libstdc++v-3/
	* configure: Regenerated.
2020-02-12 13:22:07 -08:00
Andrew Burgess 5f44a4341c libiberty/hashtab: More const parameters
Makes some parameters const in libiberty's hashtab library.

include/ChangeLog:

        * hashtab.h (htab_remove_elt): Make a parameter const.
        (htab_remove_elt_with_hash): Likewise.

libiberty/ChangeLog:

        * hashtab.c (htab_remove_elt): Make a parameter const.
        (htab_remove_elt_with_hash): Likewise.
2020-02-05 13:01:06 +00:00
Alexandre Oliva 18193e8f00 [libiberty] output empty args as a pair of quotes
writeargv writes out empty arguments in a way that expandargv skips
them instead of preserving them.  Fixed by writing out a pair of
quotes for them.


for  libiberty/ChangeLog

	* argv.c (writeargv): Output empty args as "".
2020-01-23 16:45:24 -03:00
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Tim Ruehsen 1cd4fe3d43 Fix read buffer overflow in split_directories
* make-relative-prefix.c (split_directories):
        Return early on empty 'name'

From-SVN: r279068
2019-12-06 15:20:06 -07:00
Jeff Law 513e0aa0c4 [PATCH] Fix slowness in demangler
* cp-demangle.c (d_print_init): Remove const from 4th param.
	(cplus_demangle_fill_name): Initialize d->d_counting.
	(cplus_demangle_fill_extended_operator): Likewise.
	(cplus_demangle_fill_ctor): Likewise.
	(cplus_demangle_fill_dtor): Likewise.
	(d_make_empty): Likewise.
	(d_count_templates_scopes): Remobe const from 3rd param,
	Return on dc->d_counting > 1,
	Increment dc->d_counting.
        * cp-demint.c (cplus_demangle_fill_component): Initialize d->d_counting.
	(cplus_demangle_fill_builtin_type): Likewise.
	(cplus_demangle_fill_operator): Likewise.

	* demangle.h (struct demangle_component): Add member
	d_counting.

From-SVN: r278359
2019-11-16 10:14:14 -07:00
Eduard-Mihai Burtescu 32fc3719e0 [PATCH] Refactor rust-demangle to be independent of C++ demangling.
* demangle.h (rust_demangle_callback): Add.

	* cplus-dem.c (cplus_demangle): Use rust_demangle directly.
	(rust_demangle): Remove.
	* rust-demangle.c (is_prefixed_hash): Rename to is_legacy_prefixed_hash.
	(parse_lower_hex_nibble): Rename to decode_lower_hex_nibble.
	(parse_legacy_escape): Rename to decode_legacy_escape.
	(rust_is_mangled): Remove.
	(struct rust_demangler): Add.
	(peek): Add.
	(next): Add.
	(struct rust_mangled_ident): Add.
	(parse_ident): Add.
	(rust_demangle_sym): Remove.
	(print_str): Add.
	(PRINT): Add.
	(print_ident): Add.
	(rust_demangle_callback): Add.
	(struct str_buf): Add.
	(str_buf_reserve): Add.
	(str_buf_append): Add.
	(str_buf_demangle_callback): Add.
	(rust_demangle): Add.
	* rust-demangle.h: Remove.

From-SVN: r278358
2019-11-16 08:32:50 -07:00
Miguel Saldivar f73cb38f65 * testsuite/demangle-expected: Fix test.
From-SVN: r278357
2019-11-16 07:45:30 -07:00
Kamlesh Kumar e0c866ddfd PR c++/91979 - mangling nullptr expression
2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>

gcc/cp
        * cp/mangle.c (write_template_arg_literal): Handle nullptr
        mangling.
gcc
	* common.opt (-fabi-version): Document =14.
	* doc/invoke.texi (C++ Dialect Options): Likewise.
gcc/c-family
        * c-opts.c (c_common_post_options): Update
        latest_abi_version.
libiberty
        * cp-demangle.c (d_expr_primary): Handle
        nullptr demangling.
        * testsuite/demangle-expected: Added test.

From-SVN: r277801
2019-11-04 18:24:25 -05:00
Paul Pluzhnikov 1c40e11956 cp-demangle.c (d_number): Avoid signed int overflow.
2019-10-29 Paul Pluzhnikov  <ppluzhnikov@google.com>

	* cp-demangle.c (d_number): Avoid signed int overflow.

From-SVN: r277575
2019-10-29 08:29:59 -07:00
Miguel Saldivar 420fb10c09 cp-demangle.c (d_print_mod): Add a space before printing `complex` and `imaginary`, as opposed to after.
* cp-demangle.c (d_print_mod): Add a space before printing `complex`
	and `imaginary`, as opposed to after.
	* testsuite/demangle-expected: Adjust test.

From-SVN: r277535
2019-10-28 13:14:48 -06:00