Commit Graph

209708 Commits

Author SHA1 Message Date
GCC Administrator
88ce7fbcc7 Daily bump. 2024-04-04 00:16:38 +00:00
Joseph Myers
f375550287 Update gcc sv.po
* sv.po: Update.
2024-04-03 20:47:47 +00:00
Mark Wielaard
5c749db15f Regenerate i386.opt.urls
LoongArch added an -mtls-dialect option, causing the similarly
named option for i386 get renumbered.

Fixes: b253b4695d ("LoongArch: Add support for TLS descriptors.")

gcc/ChangeLog:

	* config/i386/i386.opt.urls: Regenerate.
2024-04-03 17:39:15 +02:00
Wilco Dijkstra
8f9e92eec3 libgcc: Add missing HWCAP entries to aarch64/cpuinfo.c
A few HWCAP entries are missing from aarch64/cpuinfo.c.  This results in build
errors on older machines.

libgcc/
	* config/aarch64/cpuinfo.c: Add HWCAP_EVTSTRM, HWCAP_CRC32, HWCAP_CPUID,
	HWCAP_PACA and HWCAP_PACG.
2024-04-03 16:24:03 +01:00
H.J. Lu
cab32bacae tree-profile: Disable indirect call profiling for IFUNC resolvers
We can't profile indirect calls to IFUNC resolvers nor their callees as
it requires TLS which hasn't been set up yet when the dynamic linker is
resolving IFUNC symbols.

Add an IFUNC resolver caller marker to cgraph_node and set it if the
function is called by an IFUNC resolver.  Disable indirect call profiling
for IFUNC resolvers and their callees.

Tested with profiledbootstrap on Fedora 39/x86-64.

gcc/ChangeLog:

	PR tree-optimization/114115
	* cgraph.h (symtab_node): Add check_ifunc_callee_symtab_nodes.
	(cgraph_node): Add called_by_ifunc_resolver.
	* cgraphunit.cc (symbol_table::compile): Call
	symtab_node::check_ifunc_callee_symtab_nodes.
	* symtab.cc (check_ifunc_resolver): New.
	(ifunc_ref_map): Likewise.
	(is_caller_ifunc_resolver): Likewise.
	(symtab_node::check_ifunc_callee_symtab_nodes): Likewise.
	* tree-profile.cc (gimple_gen_ic_func_profiler): Disable indirect
	call profiling for IFUNC resolvers and their callees.

gcc/testsuite/ChangeLog:

	PR tree-optimization/114115
	* gcc.dg/pr114115.c: New test.
2024-04-03 06:49:45 -07:00
Tobias Burnus
6f91cce9a3 lto-wrapper.cc: Add offload target name to 'offload_args' suffix
lto-wrapper.cc's compile_offload_image calls mkoffload with
an @./a.offload_args argument ('a.' in case of, e.g., 'a.out'). However,
when generating code for both nvptx and gcn, they use the same name
with -save-temps. Hence, this commit adds a <target> + '.' before
'offload_args' in line with other offload-target-specific files.

gcc/ChangeLog:

	* lto-wrapper.cc (compile_offload_image): Prefix 'offload_args'
	suffix by the target name.
2024-04-03 15:47:12 +02:00
Iain Sandoe
d60968de69 libphobos, Darwin: Enable libphobos for most Darwin.
Earlier Darwin systems can be made to work too - but they need non-
standard 'binutils', so for now these must be enabled specifically.

libphobos/ChangeLog:

	* configure.tgt: Enable libphobos for Darwin >= 12.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-03 13:18:15 +01:00
Tobias Burnus
ce7cb109ff GCN: install.texi update for Newlib change and LLVM 18 release
gcc/ChangeLog:

	* doc/install.texi (amdgcn-*-amdhsa): Update Newlib recommendation
	and update wording for LLVM 18 release.
2024-04-03 14:16:41 +02:00
Jonathan Wakely
7f65d8267f
libstdc++: Reverse arguments in constraint for std::optional's <=> [PR104606]
This is a workaround for a possible compiler bug that causes constraint
recursion in the operator<=>(const optional<T>&, const U&) overload.

libstdc++-v3/ChangeLog:

	PR libstdc++/104606
	* include/std/optional (operator<=>(const optional<T>&, const U&)):
	Reverse order of three_way_comparable_with template arguments.
	* testsuite/20_util/optional/relops/104606.cc: New test.
2024-04-03 11:45:35 +01:00
Tobias Burnus
b2460d621e GCN: Fix --with-arch= handling in mkoffload [PR111966]
The default -march= setting used in mkoffload did not reflect the modified
default set by GCC's configure-time --with-arch=, causing issues when
generating debug code.

gcc/ChangeLog:

	PR other/111966
	* config/gcn/mkoffload.cc (get_arch): New; moved -march= flag
	handling from ...
	(main): ... here; call it to handle --with-arch config option
	and -march= commandline.
2024-04-03 12:37:39 +02:00
Jakub Jelinek
8455d6f6cd libquadmath: Don't assume the storage for __float128 arguments is aligned [PR114533]
With the register_printf_type/register_printf_modifier/register_printf_specifier
APIs the C library is just told the size of the argument and is provided with
a callback to fetch the argument from va_list using va_arg into C library provided
memory.  The C library isn't told what alignment requirement it has, but we were
using direct load of a __float128 value from that memory which assumes
__alignof (__float128) alignment.

The following patch fixes that by using memcpy instead.

I haven't been able to reproduce an actual crash, tried
 #include <quadmath.h>
 #include <stdlib.h>
 #include <stdio.h>

int main ()
{
  __float128 r;
  int prec = 20;
  int width = 46;
  char buf[128];

  r = 2.0q;
  r = sqrtq (r);
  int n = quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", width, r);
  if ((size_t) n < sizeof buf)
    printf ("%s\n", buf);
    /* Prints: +1.41421356237309504880e+00 */
  quadmath_snprintf (buf, sizeof buf, "%Qa", r);
  if ((size_t) n < sizeof buf)
    printf ("%s\n", buf);
    /* Prints: 0x1.6a09e667f3bcc908b2fb1366ea96p+0 */
  n = quadmath_snprintf (NULL, 0, "%+-#46.*Qe", prec, r);
  if (n > -1)
    {
      char *str = malloc (n + 1);
      if (str)
        {
          quadmath_snprintf (str, n + 1, "%+-#46.*Qe", prec, r);
          printf ("%s\n", str);
          /* Prints: +1.41421356237309504880e+00 */
        }
      free (str);
    }
  printf ("%+-#*.20Qe\n", width, r);
  printf ("%Qa\n", r);
  printf ("%+-#46.*Qe\n", prec, r);
  printf ("%d %Qe %d %Qe %d %Qe\n", 1, r, 2, r, 3, r);
  return 0;
}
In any case, I think memcpy for loading from it is right.

2024-04-03  Simon Chopin  <simon.chopin@canonical.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR libquadmath/114533
	* printf/printf_fp.c (__quadmath_printf_fp): Use memcpy to copy
	__float128 out of args.
	* printf/printf_fphex.c (__quadmath_printf_fphex): Likewise.

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
2024-04-03 10:13:40 +02:00
Jakub Jelinek
03039744f3 expr: Fix up emit_push_insn [PR114552]
r13-990 added optimizations in multiple spots to optimize during
expansion storing of constant initializers into targets.
In the load_register_parameters and expand_expr_real_1 cases,
it checks it has a tree as the source and so knows we are reading
that whole decl's value, so the code is fine as is, but in the
emit_push_insn case it checks for a MEM from which something
is pushed and checks for SYMBOL_REF as the MEM's address, but
still assumes the whole object is copied, which as the following
testcase shows might not always be the case.  In the testcase,
k is 6 bytes, then 2 bytes of padding, then another 4 bytes,
while the emit_push_insn wants to store just the 6 bytes.

The following patch simply verifies it is the whole initializer
that is being stored, I think that is best thing to do so late
in GCC 14 cycle as well for backporting.

For GCC 15, perhaps the code could stop requiring it must be at offset zero,
nor that the size is equal, but could use
get_symbol_constant_value/fold_ctor_reference gimple-fold APIs to actually
extract just part of the initializer if we e.g. push just some subset
(of course, still verify that it is a subset).  For sizes which are power
of two bytes and we have some integer modes, we could use as type for
fold_ctor_reference corresponding integral types, otherwise dunno, punt
or use some structure (e.g. try to find one in the initializer?), whatever.
But even in the other spots it could perhaps handle loading of
COMPONENT_REFs or MEM_REFs from the .rodata vars.

2024-04-03  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/114552
	* expr.cc (emit_push_insn): Only use store_constructor for
	immediate_const_ctor_p if int_expr_size matches size.

	* gcc.c-torture/execute/pr114552.c: New test.
2024-04-03 09:59:45 +02:00
Richard Biener
e7b7188b1c tree-optimization/114557 - reduce ehcleanup peak memory use
The following reduces peak memory use for the PR114480 testcase at -O1
which is almost exclusively spent by the ehcleanup pass in allocating
PHI nodes.  The free_phinodes cache we maintain isn't very effective
since it has effectively two slots, one for 4 and one for 9 argument
PHIs and it is only ever used for allocations up to 9 arguments but
we put all larger PHIs in the 9 argument bucket.  This proves
uneffective resulting in much garbage to be kept when incrementally
growing PHI nodes by edge redirection.

The mitigation is to rely on the GC freelist for larger sizes and
thus immediately return all larger bucket sized PHIs to it via ggc_free.

This reduces the peak memory use from 19.8GB to 11.3GB and compile-time
from 359s to 168s.

	PR tree-optimization/114557
	PR tree-optimization/114480
	* tree-phinodes.cc (release_phi_node): Return PHIs from
	allocation buckets not covered by free_phinodes to GC.
	(remove_phi_node): Release the PHI LHS before freeing the
	PHI node.
	* tree-vect-loop.cc (vectorizable_live_operation): Get PHI lhs
	before releasing it.
2024-04-03 08:56:45 +02:00
Jiahao Xu
8677182f32 LoongArch: Remove unused code.
gcc/ChangeLog:

	* config/loongarch/lasx.md: Remove unused code.
	* config/loongarch/loongarch-protos.h
	(loongarch_split_lsx_copy_d): Remove.
	(loongarch_split_lsx_insert_d): Ditto.
	(loongarch_split_lsx_fill_d): Ditto.
	* config/loongarch/loongarch.cc
	(loongarch_split_lsx_copy_d): Ditto.
	(loongarch_split_lsx_insert_d): Ditto.
	(loongarch_split_lsx_fill_d): Ditto.
	* config/loongarch/lsx.md (lsx_vpickve2gr_du): Remove splitter.
	(lsx_vpickve2gr_<lsxfmt_f>): Ditto.
	(abs<mode>2): Remove expander.
	(vabs<mode>2): Rename 2 abs<mode>2.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/vector/lsx/lsx-abs.c: New test.
2024-04-03 09:40:49 +08:00
GCC Administrator
a1e6798acf Daily bump. 2024-04-03 00:17:29 +00:00
Gaius Mulley
1bafa6a3fd PR modula2/114565 progress trace would be useful to isolate ICE for users
This patch introduces the internal option -fm2-debug-trace= which can
be given a comma separated list of filter terms.  Currently it allows:
all,line,token,quad.  The patch allows users to trace the progress of
cc1gm2 so that source which causes an ICE can be reduced.  Once
PR113836 is complete it is expected that the trace information will be
written to file.

gcc/m2/ChangeLog:

	PR modula2/114565
	* gm2-compiler/M2GenGCC.mod (CodeStatement): Test
	GetDebugTraceQuad before calling DisplayQuad.
	* gm2-compiler/M2LexBuf.mod (NumberIO): Import CardToStr.
	(GetToken): Test GetDebugTraceToken before writing the
	token number or token line.
	* gm2-compiler/M2Options.def (SetDebugTraceQuad): Rename to
	(SetM2DebugTraceFilter): ...this.
	(SetDebugTraceAPI): Remove.
	(GetDebugTraceQuad): New procedure function.
	(GetDebugTraceTree): Ditto.
	(GetDebugTraceToken): Ditto.
	(GetDebugTraceLine): Ditto.
	(GetDebugFunctionLineNumbers): Ditto.
	* gm2-compiler/M2Options.mod (DebugFunctionLineNumbers): New
	boolean variable.
	(DebugTraceQuad): Ditto.
	(DebugTraceTree): Ditto.
	(DebugTraceLine): Ditto.
	(DebugTraceToken): Ditto.
	(errors1): New procedure.
	(SetDebugTraceQuad): Remove.
	(SetM2DebugTraceFilter): New procedure implemented.
	(SetM2DebugTrace): Ditto.
	(GetDebugTraceQuad): Ditto.
	(GetDebugTraceToken ): Ditto.
	(GetDebugTraceLine): Ditto.
	(SetDebugTraceLine): Remove.
	* gm2-compiler/M2Quads.mod (GenQuadOTrash): Test
	GetDebugTraceQuad and call DisplayQuad.
	(GenQuadOTypetok): Ditto.
	* gm2-compiler/SymbolTable.mod: Replace
	DebugFunctionLineNumbers with GetDebugFunctionLineNumbers.
	* gm2-gcc/init.cc (_M2_M2LangDump_init): Add prototype.
	(init_PerCompilationInit): Add call.
	* gm2-gcc/m2misc.cc (m2misc_cerror): New function.
	(m2misc_error): Ditto.
	* gm2-gcc/m2misc.def (error): New procedure.
	(cerror): Ditto.
	* gm2-gcc/m2misc.h (m2misc_cerror): New prototype.
	(m2misc_error): Ditto.
	* gm2-gcc/m2options.h (M2Options_SetDebugTraceQuad): New
	prototype.
	(M2Options_SetDebugTraceAPI): Remove.
	(M2Options_GetDebugTraceToken): New prototype.
	(M2Options_GetDebugTraceLine): Ditto.
	(M2Options_SetDebugFunctionLineNumbers): Ditto.
	(M2Options_GetDebugFunctionLineNumbers): Ditto.
	(M2Options_SetM2DebugTraceFilter): Ditto.
	* gm2-lang.cc (gm2_langhook_init_options): Remove
	OPT_fdebug_trace_quad case.
	Remove OPT_fdebug_trace_api case.
	Add OPT_fm2_debug_trace_ case.
	* lang.opt (fm2-debug-trace): New option.
	(fdebug-trace-api): Remove.
	(fdebug-trace-quad): Remove.
	* m2.flex (m2flex_M2Error): Check s for NULL.
	(skipnewline): New function.
	(consumeLine): Call traceline.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2024-04-02 23:47:42 +01:00
Martin Uecker
871bb5ad2d Fix ICE with -g and -std=c23 related to incomplete types [PR114361]
We did not copy TYPE_CANONICAL to the incomplete variants when
completing a structure.

	PR c/114361

	gcc/c/
	* c-decl.cc (finish_struct): Set TYPE_CANONICAL when completing
	strucute types.

	gcc/testsuite/
	* gcc.dg/pr114361.c: New test.
	* gcc.dg/c23-tag-incomplete-1.c: New test.
	* gcc.dg/c23-tag-incomplete-2.c: New test.
2024-04-03 00:09:36 +02:00
David Malcolm
e945d322fc analyzer: prevent ICEs with null types
Fixes some ICEs seen analyzing the Linux kernel.

gcc/analyzer/ChangeLog:
	* region-model-manager.cc (maybe_undo_optimize_bit_field_compare):
	Guard against null types.
	* region-model.cc (apply_constraints_for_gswitch): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2024-04-02 17:42:16 -04:00
Jonathan Wakely
21aa57e73b libstdc++: Guard uses of char8_t with __cpp_char8_t [PR114519]
libstdc++-v3/ChangeLog:

	PR libstdc++/114519
	* include/bits/unicode.h (_Utf8_view): Guard with check for
	char8_t being enabled.
	(__literal_encoding_is_unicode): Guard use of char8_t with check
	for it being enabled.
	* testsuite/std/format/functions/114519.cc: New test.
2024-04-02 20:55:32 +01:00
Tom Tromey
ca2f7c8492 libiberty: Invoke D demangler when --format=auto
Investigating GDB PR d/31580 showed that the libiberty demangler
doesn't automatically demangle D mangled names.  However, I think it
should -- like C++ and Rust (new-style), D mangled names are readily
distinguished by the leading "_D", and so the likelihood of confusion
is low.  The other non-"auto" cases in this code are Ada (where the
encoded form could more easily be confused by ordinary programs) and
Java (which is long gone, but which also shared the C++ mangling and
thus was just an output style preference).

This patch also fixed another GDB bug, though of course that part
won't apply to the GCC repository.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31580
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30276

libiberty
	* cplus-dem.c (cplus_demangle): Try the D demangler with
	"auto" format.
	* testsuite/d-demangle-expected: Add --format=auto test.
2024-04-02 13:30:19 -06:00
Marek Polacek
2f2924078c c++: make __is_array return false for T[0] [PR114479]
When we switched to using the __is_array built-in trait to implement
std::is_array in r14-6623-g7fd9c349e45534, we started saying that
T[0] is an array.  There are various opinions as to whether that is
the best answer, but it seems prudent to keep the GCC 13 result.

	PR c++/114479

gcc/cp/ChangeLog:

	* semantics.cc (trait_expr_value) <case CPTK_IS_ARRAY>: Return false
	for zero-sized arrays.

gcc/testsuite/ChangeLog:

	* g++.dg/ext/is_array.C: Extend.
2024-04-02 14:32:29 -04:00
Marek Polacek
daa2e7c7ff c++: ICE with scoped enum in switch condition [PR103825]
Here we ICE when gimplifying

  enum class Type { Pawn };
  struct Piece {
    Type type : 4;
  };
  void foo() {
    switch (Piece().type)
      case Type::Pawn:;
  }

because we ended up with TYPE_PRECISION (cond) < TYPE_PRECISION (case).
That's because the case expr type here is the unlowered type Type,
whereas the conditional's type is the lowered <unnamed-signed:4>.  This
is not supposed to happen: see the comment in pop_switch around the
is_bitfield_expr_with_lowered_type check.

But here we did not revert to the lowered SWITCH_STMT_TYPE, because
the conditional contains a TARGET_EXPR, which has side-effects, which
means that finish_switch_cond -> maybe_cleanup_point_expr wraps it
in a CLEANUP_POINT_EXPR.  And is_bitfield_expr_with_lowered_type does
not see through those.

	PR c++/103825

gcc/cp/ChangeLog:

	* typeck.cc (is_bitfield_expr_with_lowered_type): Handle
	CLEANUP_POINT_EXPR.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/enum44.C: New test.
2024-04-02 14:19:16 -04:00
Jason Merrill
5d7e9a3502 c++: binding reference to comma expr [PR114561]
We represent a reference binding where the referent type is more qualified
by a ck_ref_bind around a ck_qual.  We performed the ck_qual and then tried
to undo it with STRIP_NOPS, but that doesn't work if the conversion is
buried in COMPOUND_EXPR.  So instead let's avoid performing that fake
conversion in the first place.

	PR c++/114561
	PR c++/114562

gcc/cp/ChangeLog:

	* call.cc (convert_like_internal): Avoid adding qualification
	conversion in direct reference binding.

gcc/testsuite/ChangeLog:

	* g++.dg/conversion/ref10.C: New test.
	* g++.dg/conversion/ref11.C: New test.
2024-04-02 14:11:13 -04:00
Patrick Palka
0e64bbb882 libstdc++: Allow adjacent __maybe_present_t<false, ...> fields to overlap
Currently __maybe_present_t<false, T> maps to the same empty class
type independent of T.  This is suboptimal because it means adjacent
__maybe_present_t<false, ...> members with the [[no_unique_address]]
attribute can't overlap even if the conditionally present types are
different.

This patch turns this empty class type into a template parameterized by
the conditionally present type, so that

  [[no_unique_address]] __maybe_present_t<false, T> _M_a;
  [[no_unique_address]] __maybe_present_t<false, U> _M_b;

now overlap if T and U are different.

This patch goes a step further and also adds an optional integer
discriminator parameter to allow for overlapping when T and U are
the same.

libstdc++-v3/ChangeLog:

	* include/std/ranges (ranges::__detail::_Empty): Rename to ...
	(ranges::__detail::_Absent): ... this.  Turn into a template
	parameterized by the absent type _Tp and discriminator _Disc.
	(ranges::__detail::__maybe_present_t): Add an optional
	discriminator parameter.
	(slide_view::_M_cached_begin): Pass a discriminator argument to
	__maybe_present_t.
	(slide_view::_M_cached_end): Likewise.
	* testsuite/std/ranges/adaptors/sizeof.cc: Verify the size of
	slide_view<V> is 3 instead 4 pointers.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2024-04-02 13:07:07 -04:00
Christophe Lyon
d5aa2ca06a aarch64: Fix typo in comment about FEATURE_STRING
Fix the comment to document FEATURE_STRING instead of FEAT_STRING.

2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* config/aarch64/aarch64-option-extensions.def: Fix comment.
2024-04-02 16:05:38 +00:00
Tom Tromey
1e459e6625 Prettify output of debug_dwarf_die
When debugging gcc, I tried calling debug_dwarf_die and I saw this
output:

      DW_AT_location: location descriptor:
        (0x7fffe9c2e870) DW_OP_dup 0, 0
        (0x7fffe9c2e8c0) DW_OP_bra location descriptor (0x7fffe9c2e640)
, 0
        (0x7fffe9c2e820) DW_OP_lit4 4, 0
        (0x7fffe9c2e910) DW_OP_skip location descriptor (0x7fffe9c2e9b0)
, 0
        (0x7fffe9c2e640) DW_OP_dup 0, 0

I think those ", 0" should not appear on their own lines.  The issue
seems to be that print_dw_val should not generally emit a newline,
except when recursing.

gcc/ChangeLog

	* dwarf2out.cc (print_dw_val) <dw_val_class_loc>: Don't
	print newline when not recursing.
2024-04-02 08:57:24 -06:00
Paul Thomas
a7aa9455a8 Fortran: Add error for subroutine passed to a variable dummy [PR106999]
2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
	PR fortran/106999
	* interface.cc (gfc_compare_interfaces): Add error for a
	subroutine proc pointer passed to a variable formal.
	(compare_parameter): If a procedure pointer is being passed to
	a non-procedure formal arg, and there is an an interface, use
	gfc_compare_interfaces to check and provide a more useful error
	message.

gcc/testsuite/
	PR fortran/106999
	* gfortran.dg/pr106999.f90: New test.
2024-04-02 15:53:29 +01:00
Paul Thomas
35408b3669 Fortran: Fix wrong recursive errors and class initialization [PR112407]
2024-04-02  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
	PR fortran/112407
	* resolve.cc (resolve_procedure_expression): Change the test for
	for recursion in the case of hidden procedures from modules.
	(resolve_typebound_static): Add warning for possible recursive
	calls to typebound procedures.
	* trans-expr.cc (gfc_trans_class_init_assign): Do not apply
	default initializer to class dummy where component initializers
	are all null.

gcc/testsuite/
	PR fortran/112407
	* gfortran.dg/pr112407a.f90: New test.
	* gfortran.dg/pr112407b.f90: New test.
2024-04-02 14:19:09 +01:00
Jakub Jelinek
9a5e4aade2 Fix up postboot dependencies [PR106472]
On Wed, Mar 13, 2024 at 10:13:37AM +0100, Jakub Jelinek wrote:
> While the first Makefile.tpl hunk looks obviously ok, the others look
> completely wrong to me.
> There is nothing special about libgo vs. libbacktrace/libatomic
> compared to any other target library which is not bootstrapped vs. any
> of its dependencies which are in the bootstrapped set.
> So, Makefile.tpl shouldn't hardcode such dependencies.

Here is my version of the fix.
The dependencies in the toplevel Makefile simply didn't take into account
that some target modules could be in a bootstrapped build built in some
configurations as bootstrap modules (typically as dependencies of other
target bootstrap modules), while in other configurations just as
dependencies of non-bootstrap target modules and so not built during the
bootstrap, but after it.
Makefile.tpl arranges for those postboot target module -> target module
dependencies to be emitted only inside of an @unless gcc-bootstrap block,
while for @if gcc-bootstrap it just emits
configure-target-whatever: stage_last
dependencies which ensure those postbootstrap target modules are only built
after everything that is bootstrapped has been.

Now, the libbacktrace/libatomic target modules have bootstrap=true
target_modules = { module= libbacktrace; bootstrap=true; };
target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; };
because those modules are dependencies of libphobos target module, so
when d is included among bootstrapped languages, those are all bootstrapped
and everything works correctly.
While if d is not included, libphobos target module is disabled,
libbacktrace/libatomic target modules aren't bootstrapped, nothing during
bootstrap needs them, but post bootstrap libgo target module depends on
the libatomic and libbacktrace target modules, libgfortran target module
depends on the libbacktrace target module and libgm2 target module depends
on the libatomic target module, but those dependencies were emitted only
@unless gcc-bootstrap.  There is a similar theoretical problem for zlib
target module if GCJ would be ressurected, libphobos as bootstrap target
module depends on the zlib target module, but if d is not configured,
fastjar also depends on it.

The following patch arranges for the @if gcc-bootstrap case to emit also
target module -> target module dependencies, but conditionally on the
on dependency not being bootstrapped.

In the generated Makefile.in you can see what the Makefile.tpl change
produces and that it just adds extra dependencies which weren't there
before in the @if gcc-bootstrap case.

I've bootstrapped without this patch with
../configure --enable-languages=c,c++,go; make
on x86_64-linux (note, make -j2 or higher usually worked) which failed
as described in the PR, then with this patch with the same command which
built fine and the Makefile difference between the two builds being
diff -up obj40{a,b}/Makefile
--- obj40a/Makefile     2024-03-31 00:35:22.243791499 +0100
+++ obj40b/Makefile     2024-03-31 22:40:38.143299144 +0200
@@ -29376,6 +29376,14 @@ configure-bison: stage_last
 configure-flex: stage_last
 configure-m4: stage_last

+configure-target-fastjar: maybe-configure-target-zlib
+all-target-fastjar: maybe-all-target-zlib
+all-target-libgo: maybe-all-target-libbacktrace
+all-target-libgo: maybe-all-target-libatomic
+all-target-libgm2: maybe-all-target-libatomic
+configure-target-libgfortran: maybe-all-target-libbacktrace
+configure-target-libgo: maybe-all-target-libbacktrace
+

 # Dependencies for target modules on other target modules are
 # described by lang_env_dependencies; the defaults apply to anything

which I believe are exactly the extra dependencies we want.
Plus I've done normal x86_64-linux and i686-linux bootstraps/regtests
which in my case include --enable-languages=default,ada,obj-c++,lto,go,d,rust,m2
for x86_64 and the same except ada for i686; those with my usual make -j32.
The Makefile difference in those builds vs. unpatched case
is just an extra empty line.

2024-04-02  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/106472
	* Makefile.tpl (make-postboot-target-dep): New lambda.
	Use it to add --enable-bootstrap dependencies of target modules
	on other target modules if the latter aren't bootstrapped.
	* Makefile.in: Regenerate.
2024-04-02 13:40:27 +02:00
Jakub Jelinek
94792057ad Fix up duplicated words mostly in comments, part 1
Like in r12-7519-g027e30414492d50feb2854aff38227b14300dc4b, I've done
git grep -v 'long long\|optab optab\|template template\|double double' | grep ' \([a-zA-Z]\+\) \1 '

This is just part of the changes, mostly for non-gcc directories.
I'll try to get to the rest soon.  Obviously, the above command also
finds cases which are correct as is and shouldn't be changed, so one
needs to manually inspect everything.

I'd hope most of it is pretty obvious, but the config/ and libstdc++-v3/
hunks include a tweak in a license wording, though other copies of the
similar license have the wording right.

2024-04-02  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.tpl: Fix duplicated words; returns returns ->
	returns.
config/
	* lcmessage.m4: Fix duplicated words; can can -> can,
	package package -> package.
libdecnumber/
	* decCommon.c (decFinalize): Fix duplicated words in
	comment; the the -> the.
libgcc/
	* unwind-dw2-fde.c (struct fde_accumulator): Fix duplicated
	words in comment; is is -> is.
libgfortran/
	* configure.host: Fix duplicated words; the the -> the.
libgm2/
	* configure.host: Fix duplicated words; the the -> the.
libgomp/
	* libgomp.texi (OpenMP 5.2): Fix duplicated words; with with ->
	with.
	(omp_target_associate_ptr): Fix duplicated words; either either ->
	either.
	(omp_init_allocator): Fix duplicated words; be be -> be.
	(omp_realloc): Fix duplicated words; is is -> is.
	(OMP_ALLOCATOR): Fix duplicated words; other other -> other.
	* priority_queue.h (priority_queue_multi_p): Fix duplicated words;
	to to -> to.
libiberty/
	* regex.c (byte_re_match_2_internal): Fix duplicated words in comment;
	next next -> next.
	* dyn-string.c (dyn_string_init): Fix duplicated words in comment;
	of of -> of.
libitm/
	* beginend.cc (GTM::gtm_thread::begin_transaction): Fix duplicated
	words in comment; not not -> not to.
libobjc/
	* init.c (duplicate_classes): Fix duplicated words in comment; in in
	-> in.
	* sendmsg.c (__objc_prepare_dtable_for_class): Fix duplicated words
	in comment; the the -> the.
	* encoding.c (objc_layout_structure): Likewise.
libstdc++-v3/
	* acinclude.m4: Fix duplicated words; file file -> file can.
	* configure.host: Fix duplicated words; the the -> the.
libvtv/
	* vtv_rts.cc (vtv_fail): Fix duplicated words; to to -> to.
	* vtv_fail.cc (vtv_fail): Likewise.
2024-04-02 13:39:11 +02:00
Iain Sandoe
b120e355e5 jit, Darwin: Implement library exports list.
Currently, we have no exports list for libgccjit, which means that
all symbols are exported, including those from libstdc++ which is
linked statically into the lib.  This causes failures when the
shared libstdc++ is used but some c++ symbols are satisfied from
libgccjit.

This implements an export file for Darwin (which is currently
manually created by cross-checking libgccjit.map).  Ideally we'd
script this, at some point.  Update libtool current and age to
reflect the current ABI version (we are not bumping the SO name
at this stage).

This fixes a number of new failures in jit testing.

gcc/jit/ChangeLog:

	* Make-lang.in: Implement exports list, and use a shared
	libgcc.
	* libgccjit.exports: New file.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:33:56 +01:00
Iain Sandoe
799a056cf8 testsuite: Remove duplicate -lgcov [PR114034]
Duplicate library entries now cause linker warnings with newer linker
versions on Darwin which leads to these tests regressing.  The library
is already added by the test flags so there is no need to put an extra
one in the options.

	PR testsuite/114034

gcc/testsuite/ChangeLog:

	* g++.dg/gcov/gcov-dump-1.C: Remove extra -lgcov.
	* g++.dg/gcov/gcov-dump-2.C: Likewise.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:30:17 +01:00
Iain Sandoe
ad8e34eaa8 testsuite, Darwin: Allow for an undefined symbol [PR114036].
Darwin's linker defaults to requiring all symbols to be defined at
static link time (unless specifically noted or dynamic lookuo is
enabled).

For this test, we just need to note that the symbol is expected to
be undefined.

	PR testsuite/114036

gcc/testsuite/ChangeLog:

	* gcc.misc-tests/gcov-14.c: Allow for 'Foo' to be undefined
	on Darwin link lines.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:26:47 +01:00
Iain Sandoe
451bb0b926 Darwin: Correct a version check.
When the version for dsymutil comes from a clang build, it is
of the form NNmm.pp.qq where NN and mm are the major and minor
LLVM version components.  We need to check for a major version
greater than or equal to 7 - so use 700 in the check.

gcc/ChangeLog:

	* config/darwin.cc (darwin_override_options): Update the
	clang major version value in the dsymutil check.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:24:31 +01:00
Iain Sandoe
3c499f8f6f Darwin: Do not emit .macinfo when dsymutil cannot consume it.
Some verions of dsymutil do not ignore .macinfo sections, but instead
ignore the entire debug in the file.

To avoid this total loss of debug, when we detect that the debug level
is g3 and the dsymutil version cannot support it, we reduce the level
to g2 and issue a note.

This behaviour can be overidden by -gstrict-dwarf (although the objects
will contain macinfo; dsymutil will not produce a .dSYM with it).

gcc/ChangeLog:

	* config/darwin.cc (darwin_override_options): Reduce the debug
	level to 2 if dsymutil cannot handle .macinfo sections.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:18:39 +01:00
Iain Sandoe
c85c2e26b8 testsuite, Darwin: Update bad-mapper-1 after libiberty changes.
A recent change to libiberty has improved the process spawning on
older Darwin platforms.  This patch updates the expected test output
after the changes.

gcc/testsuite/ChangeLog:

	* g++.dg/modules/bad-mapper-1.C: Update expected test output
	for earlier Darwin.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2024-04-02 12:09:44 +01:00
Yang Yujie
078f4a958c LoongArch: Fix missing plugin header
gcc/ChangeLog:

	* config/loongarch/t-loongarch: Add loongarch-def-arrays.h
	to OPTION_H_EXTRA.
2024-04-02 15:44:40 +08:00
mengqinggang
b253b4695d LoongArch: Add support for TLS descriptors.
Add support for TLS descriptors on normal code model and extreme
code model.

Normal code model instruction sequence:
  -mno-explicit-relocs:
    la.tls.desc	$r4, s
    add.d	$r12, $r4, $r2
  -mexplicit-relocs:
    pcalau12i	$r4,%desc_pc_hi20(s)
    addi.d	$r4,$r4,%desc_pc_lo12(s)
    ld.d	$r1,$r4,%desc_ld(s)
    jirl	$r1,$r1,%desc_call(s)
    add.d	$r12, $r4, $r2

Extreme code model instruction sequence:
  -mno-explicit-relocs:
    la.tls.desc	$r4, $r12, s
    add.d	$r12, $r4, $r2
  -mexplicit-relocs:
    pcalau12i	$r4,%desc_pc_hi20(s)
    addi.d	$r12,$r0,%desc_pc_lo12(s)
    lu32i.d	$r12,%desc64_pc_lo20(s)
    lu52i.d	$r12,$r12,%desc64_pc_hi12(s)
    add.d	$r4,$r4,$r12
    ld.d	$r1,$r4,%desc_ld(s)
    jirl	$r1,$r1,%desc_call(s)
    add.d	$r12, $r4, $r2

The default is still traditional TLS model, but can be configured with
--with-tls={trad,desc}. The default can change to TLS descriptors once
libc and LLVM support this.

gcc/ChangeLog:

	* config.gcc: Add --with-tls option to change TLS flavor.
	* config/loongarch/genopts/loongarch.opt.in: Add -mtls-dialect to
	configure TLS flavor.
	* config/loongarch/loongarch-def.h (struct loongarch_target): Add
	tls_dialect.
	* config/loongarch/loongarch-driver.cc (la_driver_init): Add tls
	flavor.
	* config/loongarch/loongarch-opts.cc (loongarch_init_target): Add
	tls_dialect.
	(loongarch_config_target): Ditto.
	(loongarch_update_gcc_opt_status): Ditto.
	* config/loongarch/loongarch-opts.h (loongarch_init_target): Ditto.
	(TARGET_TLS_DESC): New define.
	* config/loongarch/loongarch.cc (loongarch_symbol_insns): Add TLS
	DESC instructions sequence length.
	(loongarch_legitimize_tls_address): New TLS DESC instruction sequence.
	(loongarch_option_override_internal): Add la_opt_tls_dialect.
	(loongarch_option_restore): Add la_target.tls_dialect.
	* config/loongarch/loongarch.md (@got_load_tls_desc<mode>): Normal
	code model for TLS DESC.
	(got_load_tls_desc_off64): Extreme cmode model for TLS DESC.
	* config/loongarch/loongarch.opt: Regenerate.
	* config/loongarch/loongarch.opt.urls: Ditto.
	* doc/invoke.texi: Add a description of the compilation option
	'-mtls-dialect={trad,desc}'.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/cmodel-extreme-1.c: Add -mtls-dialect=trad.
	* gcc.target/loongarch/cmodel-extreme-2.c: Ditto.
	* gcc.target/loongarch/explicit-relocs-auto-tls-ld-gd.c: Ditto.
	* gcc.target/loongarch/explicit-relocs-medium-call36-auto-tls-ld-gd.c:
	Ditto.
	* gcc.target/loongarch/func-call-medium-1.c: Ditto.
	* gcc.target/loongarch/func-call-medium-2.c: Ditto.
	* gcc.target/loongarch/func-call-medium-3.c: Ditto.
	* gcc.target/loongarch/func-call-medium-4.c: Ditto.
	* gcc.target/loongarch/tls-extreme-macro.c: Ditto.
	* gcc.target/loongarch/tls-gd-noplt.c: Ditto.
	* gcc.target/loongarch/explicit-relocs-auto-extreme-tls-desc.c: New test.
	* gcc.target/loongarch/explicit-relocs-auto-tls-desc.c: New test.
	* gcc.target/loongarch/explicit-relocs-extreme-tls-desc.c: New test.
	* gcc.target/loongarch/explicit-relocs-tls-desc.c: New test.

Co-authored-by: Lulu Cheng <chenglulu@loongson.cn>
Co-authored-by: Xi Ruoyao <xry111@xry111.site>
2024-04-02 13:59:12 +08:00
Lulu Cheng
6f9ba3ea55 LoongArch: Regenerate loongarch.opt.urls.
Fixes: d28ea8e5a7 ("LoongArch: Split loongarch_option_override_internal
		      into smaller procedures")

gcc/ChangeLog:

	* config/loongarch/loongarch.opt.urls: Regenerate.
2024-04-02 09:21:29 +08:00
GCC Administrator
0454eec362 Daily bump. 2024-04-02 00:17:27 +00:00
Gaius Mulley
4bd2f59af4 PR modula2/114548 gm2 fails to identify variable in a const expression
This patch introduces stricter checking within standard procedure
functions which detect whether paramaters are variable when used
in a const expression.

gcc/m2/ChangeLog:

	PR modula2/114548
	* gm2-compiler/M2Quads.mod (ConvertToAddress): Pass
	procedure, false parameters to BuildConvertFunction.
	(PushOne): Pass procedure, true parameters to
	BuildConvertFunction.
	Remove usused parameter internal.
	(BuildPseudoBy): Remove parameter to PushOne.
	(BuildIncProcedure): Ditto.
	(BuildDecProcedure): Ditto.
	(BuildFunctionCall): Add ConstExpr parameter to
	BuildPseudoFunctionCall.
	(BuildConstFunctionCall): Add procedure and true to
	BuildConvertFunction.
	(BuildPseudoFunctionCall): Add ConstExpr parameter.
	Pass ProcSym and ConstExpr to BuildLengthFunction,
	BuildConvertFunction, BuildOddFunction, BuildAbsFunction,
	BuildCapFunction, BuildValFunction, BuildChrFunction,
	BuildOrdFunction, BuildIntFunction, BuildTruncFunction,
	BuildFloatFunction, BuildAddAdrFunction, BuildSubAdrFunction,
	BuildDifAdrFunction, BuildCastFunction, BuildReFunction,
	BuildImFunction and BuildCmplxFunction.
	(BuildAddAdrFunction): Add ProcSym, ConstExpr parameters and
	check for constant parameters.
	(BuildSubAdrFunction): Ditto.
	(BuildDifAdrFunction): Ditto.
	(ConstExprError): Ditto.
	(BuildLengthFunction): Ditto.
	(BuildOddFunction): Ditto.
	(BuildAbsFunction): Ditto.
	(BuildCapFunction): Ditto.
	(BuildChrFunction): Ditto.
	(BuildOrdFunction): Ditto.
	(BuildIntFunction): Ditto.
	(BuildValFunction): Ditto.
	(BuildCastFunction): Ditto.
	(BuildConvertFunction): Ditto.
	(BuildTruncFunction): Ditto.
	(BuildFloatFunction): Ditto.
	(BuildReFunction): Ditto.
	(BuildImFunction): Ditto.
	(BuildCmplxFunction): Ditto.

gcc/testsuite/ChangeLog:

	PR modula2/114548
	* gm2/iso/const/fail/expression.mod: New test.
	* gm2/iso/const/fail/iso-const-fail.exp: New test.
	* gm2/iso/const/fail/testabs.mod: New test.
	* gm2/iso/const/fail/testaddadr.mod: New test.
	* gm2/iso/const/fail/testcap.mod: New test.
	* gm2/iso/const/fail/testcap2.mod: New test.
	* gm2/iso/const/fail/testchr.mod: New test.
	* gm2/iso/const/fail/testchr2.mod: New test.
	* gm2/iso/const/fail/testcmplx.mod: New test.
	* gm2/iso/const/fail/testfloat.mod: New test.
	* gm2/iso/const/fail/testim.mod: New test.
	* gm2/iso/const/fail/testint.mod: New test.
	* gm2/iso/const/fail/testlength.mod: New test.
	* gm2/iso/const/fail/testodd.mod: New test.
	* gm2/iso/const/fail/testord.mod: New test.
	* gm2/iso/const/fail/testre.mod: New test.
	* gm2/iso/const/fail/testtrunc.mod: New test.
	* gm2/iso/const/fail/testval.mod: New test.
	* gm2/iso/const/pass/constbool.mod: New test.
	* gm2/iso/const/pass/constbool2.mod: New test.
	* gm2/iso/const/pass/constbool3.mod: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2024-04-01 19:18:36 +01:00
Jason Merrill
bba118db3f c++: C++26 returning reference to temporary
P2748R5 makes it ill-formed to return a reference to temporary in C++26;
implementing this is a simple matter of changing the existing warning to a
permerror.

For most of the tests I just changed dg-warning to dg-message to accept
both; I test the specific diagnostic type in Wreturn-local-addr-5.C.

gcc/cp/ChangeLog:

	* typeck.cc (maybe_warn_about_returning_address_of_local):
	Permerror in C++26.

gcc/testsuite/ChangeLog:

	* g++.dg/conversion/pr16333.C: Change dg-warning to dg-message.
	* g++.dg/cpp0x/constexpr-48324.C
	* g++.dg/other/pr94326.C
	* g++.dg/warn/Wreturn-local-addr-2.C
	* g++.old-deja/g++.jason/warning8.C: Likewise.
	* g++.dg/cpp1y/auto-fn6.C: Check that others don't complain.
	* g++.dg/warn/Wreturn-local-addr-5.C: Expect error in C++26.
2024-04-01 12:02:50 -04:00
Yang Yujie
d28ea8e5a7 LoongArch: Split loongarch_option_override_internal into smaller procedures
gcc/ChangeLog:

	* config/loongarch/genopts/loongarch.opt.in: Mark -m[no-]recip as
	aliases to -mrecip={all,none}, respectively.
	* config/loongarch/loongarch.opt: Regenerate.
	* config/loongarch/loongarch-def.h (ABI_FPU_64): Rename to...
	(ABI_FPU64_P): ...this.
	(ABI_FPU_32): Rename to...
	(ABI_FPU32_P): ...this.
	(ABI_FPU_NONE): Rename to...
	(ABI_NOFPU_P): ...this.
	(ABI_LP64_P): Define.
	* config/loongarch/loongarch.cc (loongarch_init_print_operand_punct):
	Merged into loongarch_global_init.
	(loongarch_cpu_option_override): Renamed to
	loongarch_target_option_override.
	(loongarch_option_override_internal): Move the work after
	loongarch_config_target into loongarch_target_option_override.
	(loongarch_global_init): Define.
	(INIT_TARGET_FLAG): Move to loongarch-opts.cc.
	(loongarch_option_override): Call loongarch_global_init
	separately.
	* config/loongarch/loongarch-opts.cc (loongarch_parse_mrecip_scheme):
	Split the parsing of -mrecip=<string> from
	loongarch_option_override_internal.
	(loongarch_generate_mrecip_scheme): Define. Split from
	loongarch_option_override_internal.
	(loongarch_target_option_override): Define. Renamed from
	loongarch_cpu_option_override.
	(loongarch_init_misc_options): Define. Split from
	loongarch_option_override_internal.
	(INIT_TARGET_FLAG): Move from loongarch.cc.
	* config/loongarch/loongarch-opts.h (loongarch_target_option_override):
	New prototype.
	(loongarch_parse_mrecip_scheme): New prototype.
	(loongarch_init_misc_options): New prototype.
	(TARGET_ABI_LP64): Simplify with ABI_LP64_P.
	* config/loongarch/loongarch.h (TARGET_RECIP_DIV): Simplify.
	Do not reference specific CPU architecture (LA664).
	(TARGET_RECIP_SQRT): Same.
	(TARGET_RECIP_RSQRT): Same.
	(TARGET_RECIP_VEC_DIV): Same.
	(TARGET_RECIP_VEC_SQRT): Same.
	(TARGET_RECIP_VEC_RSQRT): Same.
2024-04-01 09:06:46 +08:00
Lulu Cheng
7f424c3167 LoongArch: Add descriptions of the compilation options.
Add descriptions for the compilation options '-mfrecipe' '-mdiv32'
'-mlam-bh' '-mlamcas' and '-mld-seq-sa'.

gcc/ChangeLog:

	* doc/invoke.texi: Add descriptions for the compilation
	options.
2024-04-01 09:03:32 +08:00
GCC Administrator
1831a5e13b Daily bump. 2024-04-01 00:16:45 +00:00
Christophe Lyon
14d0c863aa modula2: Fix m2.install-info in gcc/m2/Make-lang.in
Fix a few typos: the generated filename is m2.info (not gm2.info, and
gm2$(exeext) is a file not a directory (so test -d would always fail).

2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/m2/
	* Make-lang.in (m2.install-info): Fix rule.
2024-03-31 16:54:33 +00:00
Christophe Lyon
ec2c15f14f modula2: Add m2.install-html rule to gcc/m2/Make-lang.in
This rule was missing, and 'make install-html' was failing.
It is copied from the corresponding one in fortran.

2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/m2/
	* Make-lang.in (install-html): New rule.
2024-03-31 16:54:33 +00:00
Jeff Law
08eaafadd5 [committed] RISC-V: Add missing insn types to XiangShan Nanhu scheduler model
The test for the recently added XiangShan Nanhu microarchitecture is failing
because the scheduler description does not have entries for certain insn types.

I'm adding  branch, jalr, ret and sfb_alu to the scheduler description, that's
enough to get the trivial test to pass.  However, I strongly suspect running
any significant code through the compiler when scheduling for this
microarchitecture will trigger faults.

Basically we have checking now that will fault if we have an insn in the IL
without an associated type or if we have an insn in the IL that does not map to
an insn reservation in the scheduler model.  We were tripping the latter
assertion for one of those branch types.  My suspicion is many insn types
aren't handled by that DFA.

The branch insns were pretty obvious and easy to fix.  But someone with more
experience with the uarch needs to do an audit to ensure that all insn types
map to an insn reservation.

gcc/
	* config/riscv/xiangshan.md (xiangshan_jump): Add branch, jalr, ret
	and sfb_alu.
2024-03-31 10:51:17 -06:00
Pan Li
b313baba57 RISC-V: Fix misspelled term builtin in error message
This patch would like to fix below misspelled term in error message.

../../gcc/config/riscv/riscv-vector-builtins.cc:4592:16: error:
misspelled term 'builtin function' in format; use 'built-in function' instead [-Werror=format-diag]
 4592 |               "builtin function %qE requires the V ISA extension", exp);

The below tests are passed for this patch.
* The riscv regression test on rvv.exp and riscv.exp.

gcc/ChangeLog:

	* config/riscv/riscv-vector-builtins.cc (expand_builtin): Take
	the term built-in over builtin.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/base/target_attribute_v_with_intrinsic-7.c:
	Adjust test dg-error.
	* gcc.target/riscv/rvv/base/target_attribute_v_with_intrinsic-8.c:
	Ditto.

Signed-off-by: Pan Li <pan2.li@intel.com>
2024-03-31 18:37:50 +08:00
Pan Li
46eb34a75a RISC-V: Fix one unused varable in riscv_subset_list::parse
This patch would like to fix one unused variable as below:

../../gcc/common/config/riscv/riscv-common.cc: In static member function
'static riscv_subset_list* riscv_subset_list::parse(const char*, location_t)':
../../gcc/common/config/riscv/riscv-common.cc:1501:19: error: unused variable 'itr'
  [-Werror=unused-variable]
 1501 |   riscv_subset_t *itr;

The variable consume code was removed but missed the var itself in
previous.  Thus, we have unused variable here.

gcc/ChangeLog:

	* common/config/riscv/riscv-common.cc (riscv_subset_list::parse):
	Remove unused var decl.

Signed-off-by: Pan Li <pan2.li@intel.com>
2024-03-31 18:36:58 +08:00