Skip to content
Snippets Groups Projects
  1. Oct 05, 2024
  2. Oct 04, 2024
    • Thiago Jung Bauermann's avatar
      MAINTAINERS: Add myself to write after approval · 3f10a242
      Thiago Jung Bauermann authored
      ChangeLog:
      	* MAINTAINERS: Add myself to write after approval.
      3f10a242
    • David Malcolm's avatar
      diagnostics: bulletproof opening of SARIF output [PR116978] · 385a2322
      David Malcolm authored
      
      Introduce a new RAII class diagnostic_output_file to track ownership
      of the FILE * for SARIF output.
      
      In particular, the .sarif file is now opened immediately, rather
      than at the end of the compile, and so will fail earlier if the
      file can't be opened.
      
      Doing so fixes a couple of ICEs in -fdiagnostics-format=sarif-file when
      invoking, say, cc1 directly, rather than from the driver.
      
      gcc/ChangeLog:
      	PR other/116978
      	* diagnostic-format-sarif.cc (sarif_builder::sarif_builder):
      	Gracefully handle "main_input_filename_" being NULL.
      	(sarif_output_format::sarif_output_format): Replace param
      	"base_file_name" with "output_file" and assert that the file
      	was opened successfully and has a non-NULL filename.
      	(sarif_output_format::~sarif_file_output_format): Move
      	responsibility for building the filename and opening the file from
      	here to the creator of the instance.
      	(sarif_output_format::m_base_file_name): Replace with...
      	(sarif_output_format::m_output_file): ...this.
      	(diagnostic_output_format_init_sarif_file): Make "line_maps" param
      	non-const.  Gracefully handle "base_file_name" being NULL.
      	Construct the filename and open the file here, rather than in
      	~sarif_file_output_format, and handle failures immediately here,
      	rather than at the end of the compile.
      	* diagnostic-format-sarif.h: Include "diagnostic-output-file.h".
      	(diagnostic_output_format_init_sarif_file): Make "line_maps" param
      	non-const.
      	* diagnostic-output-file.h: New file.
      	* diagnostic.cc (diagnostic_context::emit_diagnostic): New.
      	(diagnostic_context::emit_diagnostic_va): New.
      	* diagnostic.h (diagnostic_context::emit_diagnostic): New decl.
      	(diagnostic_context::emit_diagnostic_va): New decl.
      
      Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
      385a2322
    • H.J. Lu's avatar
      x86: Disable stack protector for naked functions · 7d2845da
      H.J. Lu authored
      
      Since naked functions should not enable stack protector, define
      TARGET_STACK_PROTECT_RUNTIME_ENABLED_P to disable stack protector
      for naked functions.
      
      gcc/
      
      	PR target/116962
      	* config/i386/i386.cc (ix86_stack_protect_runtime_enabled_p): New
      	function.
      	(TARGET_STACK_PROTECT_RUNTIME_ENABLED_P): New.
      
      gcc/testsuite/
      
      	PR target/116962
      	* gcc.target/i386/pr116962.c: New file.
      
      Signed-off-by: default avatarH.J. Lu <hjl.tools@gmail.com>
      7d2845da
    • Saurabh Jha's avatar
      aarch64: Fix bug with max/min (PR116934) · 20ce363c
      Saurabh Jha authored
      In ac4cdf5c, I introduced a bug where
      I put the new unspecs, UNSPEC_COND_SMAX and UNSPEC_COND_SMIN, into the
      wrong iterator.
      
      I should have put new unspecs in SVE_COND_FP_MAXMIN but I put it in
      SVE_COND_FP_BINARY_REG instead. That was incorrect because the
      SVE_COND_FP_MAXMIN iterator is being used for predicated floating-point
      maximum/minimum, not SVE_COND_FP_BINARY_REG.
      
      Also added a testcase to validate the new change.
      
      Regression tested on aarch64-unknown-linux-gnu and found no regressions.
      There are some test cases with "libitm" in their directory names which
      appear in compare_tests output as changed tests but it looks like they
      are in the output just because of changed build directories, like from
      build-patched/aarch64-unknown-linux-gnu/./libitm/* to
      build-pristine/aarch64-unknown-linux-gnu/./libitm/*. I didn't think it
      was a cause of concern and have pushed this for review.
      
      gcc/ChangeLog:
      
      	PR target/116934
      	* config/aarch64/iterators.md: Move UNSPEC_COND_SMAX and
      	UNSPEC_COND_SMIN to correct iterators.
      
      gcc/testsuite/ChangeLog:
      
      	PR target/116934
      	* gcc.target/aarch64/sve2/pr116934.c: New test.
      20ce363c
    • Georg-Johann Lay's avatar
      AVR: target/116953 - ICE due to operands clobber in avr_out_sbxx_branch. · 58b9024c
      Georg-Johann Lay authored
      	PR target/116953
      gcc/
      	* config/avr/avr.cc (avr_out_sbxx_branch): Work on a copy of
      	the operands rather than on operands itself, which is just
      	recog_data.operand and may be clobbered by jump_over_one_insn_p.
      gcc/testsuite/
      	* gcc.target/avr/torture/pr116953.c: New test.
      58b9024c
    • Georg-Johann Lay's avatar
      testsuite - Some float64 and float32x test require double64plus. · 0f39769a
      Georg-Johann Lay authored
      Some of the float64 and float32x test cases are using double built-ins
      and hence require double64plus resp. that double is at least as good
      as float32x (double_float32xplus).
      
      gcc/testsuite/
      	* lib/target-supports.exp (check_effective_target_double_float32xplus):
      	New proc.
      	* gcc.dg/torture/float32x-builtin.c: Add
      	dg-require-effective-target double_float32xplus.
      	* gcc.dg/torture/float32x-tg-2.c: Same.
      	* gcc.dg/torture/float32x-tg.c: Same.
      	* gcc.dg/torture/float64-builtin.c: Add
      	dg-require-effective-target double64plus.
      	* gcc.dg/torture/float64-tg-2.c: Same.
      	* gcc.dg/torture/float64-tg.c: Same.
      0f39769a
    • Andrew Pinski's avatar
      cfgexpand: Expand comment on when non-var clobbers can show up · 6064420e
      Andrew Pinski authored
      
      The comment here is not wrong, just it would be better if mentioning
      the C++ front-end instead of just the nested function lowering.
      
      gcc/ChangeLog:
      
      	* cfgexpand.cc (add_scope_conflicts_1): Expand comment
      	on when non-var clobbers show up.
      
      Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
      6064420e
    • Thiago Jung Bauermann's avatar
      testsuite: Fix fallout of turning warnings into errors on 32-bit Arm · 115857bf
      Thiago Jung Bauermann authored
      Since commits 2c3db94d ("c: Turn int-conversion warnings into
      permerrors") and 55e94561 ("c: Turn -Wimplicit-function-declaration
      into a permerror") these tests fail with errors such as:
      
        FAIL: gcc.target/arm/pr59858.c (test for excess errors)
        FAIL: gcc.target/arm/pr65647.c (test for excess errors)
        FAIL: gcc.target/arm/pr65710.c (test for excess errors)
        FAIL: gcc.target/arm/pr97969.c (test for excess errors)
      
      Here's one example of the excess errors:
      
        FAIL: gcc.target/arm/pr65647.c (test for excess errors)
        Excess errors:
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:6:17: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:6:51: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:6:62: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:7:48: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:8:9: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:24:5: error: initialization of 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:25:5: error: initialization of 'int' from 'struct S1 *' makes integer from pointer without a cast [-Wint-conversion]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:41:3: error: implicit declaration of function 'fn3'; did you mean 'fn2'? [-Wimplicit-function-declaration]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:46:3: error: implicit declaration of function 'fn5'; did you mean 'fn4'? [-Wimplicit-function-declaration]
        /path/gcc.git/gcc/testsuite/gcc.target/arm/pr65647.c:57:16: error: implicit declaration of function 'fn6'; did you mean 'fn4'? [-Wimplicit-function-declaration]
      
      PR rtl-optimization/59858 and PR target/65710 test the fix of an ICE.
      PR target/65647 and PR target/97969 test for a compilation infinite loop.
      
      Therefore, add -fpermissive so that the tests behave as they did previously.
      Tested on armv8l-linux-gnueabihf.
      
      gcc/testsuite/ChangeLog:
      	* gcc.target/arm/pr59858.c: Add -fpermissive.
      	* gcc.target/arm/pr65647.c: Likewise.
      	* gcc.target/arm/pr65710.c: Likewise.
      	* gcc.target/arm/pr97969.c: Likewise.
      115857bf
    • Georg-Johann Lay's avatar
      Revert: AVR: Implement TARGET_FLOATN_MODE. · f139cbe7
      Georg-Johann Lay authored
      	Revert r15-4073 / 98a1a886
      	The default TARGET_FLOATN_MODE is just fine.
      gcc/
      	* config/avr/avr.cc (avr_floatn_mode): Remove.
      	(TARGET_FLOATN_MODE): Remove.
      f139cbe7
    • Georg-Johann Lay's avatar
      AVR: Implement TARGET_FLOATN_MODE. · 98a1a886
      Georg-Johann Lay authored
      gcc/
      	* config/avr/avr.cc (avr_floatn_mode): New static function.
      	(TARGET_FLOATN_MODE): New define.
      98a1a886
    • Gaius Mulley's avatar
      PR modula2/116918 -fswig correct syntax fixup · e2a701cd
      Gaius Mulley authored
      
      This patch adds a missing % escape in DoCheckUnbounded.
      
      gcc/m2/ChangeLog:
      
      	PR modula2/116918
      	* gm2-compiler/M2Swig.mod (DoCheckUnbounded): Escape
      	the % character used in array_functions with %%.
      
      Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
      e2a701cd
    • Tsung Chun Lin's avatar
      [PATCH] RISC-V/libgcc: Fix incorrect .cfi_offset for saving ra in __riscv_save_[0-3] on ilp32e. · 78d2af1f
      Tsung Chun Lin authored
      From 8b3c5ebe8aacbcc4ddf1be8dea9a555e7e1bcc39 Mon Sep 17 00:00:00 2001
      From: Jim Lin <jim@andestech.com>
      Date: Fri, 4 Oct 2024 14:48:12 +0800
      Subject: [PATCH] RISC-V/libgcc: Fix incorrect .cfi_offset for saving ra in
       __riscv_save_[0-3] on ilp32e.
      
      libgcc/ChangeLog:
      
      	* config/riscv/save-restore.S: Fix .cfi_offset for saving ra in
      	__riscv_save_[0-3] on ilp32e.
      78d2af1f
    • Patrick Palka's avatar
      libstdc++/ranges: Implement various small LWG issues · 20165d01
      Patrick Palka authored
      
      This implements the following small LWG issues:
      
        3848. adjacent_view, adjacent_transform_view and slide_view missing base accessor
        3851. chunk_view::inner-iterator missing custom iter_move and iter_swap
        3947. Unexpected constraints on adjacent_transform_view::base()
        4001. iota_view should provide empty
        4012. common_view::begin/end are missing the simple-view check
        4013. lazy_split_view::outer-iterator::value_type should not provide default constructor
        4035. single_view should provide empty
        4053. Unary call to std::views::repeat does not decay the argument
        4054. Repeating a repeat_view should repeat the view
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/ranges (single_view::empty): Define as per LWG 4035.
      	(iota_view::empty): Define as per LWG 4001.
      	(lazy_split_view::_OuterIter::value_type): Remove default
      	constructor and make other constructor private as per LWG 4013.
      	(common_view::begin): Disable non-const overload for simple
      	views as per LWG 4012.
      	(common_view::end): Likewise.
      	(adjacent_view::base): Define as per LWG 3848.
      	(adjacent_transform_view::base): Likewise.
      	(chunk_view::_InnerIter::iter_move): Define as per LWG 3851.
      	(chunk_view::_InnerIter::itep_swap): Likewise.
      	(slide_view::base): Define as per LWG 3848.
      	(repeat_view): Adjust deduction guide as per LWG 4053.
      	(_Repeat::operator()): Adjust single-parameter overload as per
      	LWG 4054.
      	* testsuite/std/ranges/adaptors/adjacent/1.cc: Verify existence
      	of base member function.
      	* testsuite/std/ranges/adaptors/adjacent_transform/1.cc: Likewise.
      	* testsuite/std/ranges/adaptors/chunk/1.cc: Test LWG 3851 example.
      	* testsuite/std/ranges/adaptors/slide/1.cc: Verify existence of
      	base member function.
      	* testsuite/std/ranges/iota/iota_view.cc: Test LWG 4001 example.
      	* testsuite/std/ranges/repeat/1.cc: Test LWG 4053/4054 examples.
      
      Reviewed-by: default avatarJonathan Wakely <jwakely@redhat.com>
      20165d01
    • Jakub Jelinek's avatar
      testsuite: Fix up unevalstr2.C test · c679cafb
      Jakub Jelinek authored
      The CWG2521 changes adjusted the unevalstr1.C test but didn't adjust
      unevalstr2.C test, which now FAILs in C++23 mode.
      
      The intent in both of those tests was to test the separate (now deprecated)
      syntax, so instead of removing the space between closing " and _ I've
      adjusted the testcase to expect those 17 extra warnings.  And I've also
      adjusted the unevalstr1.C testcase to do the same, when it is removed from
      C++29 or whatever, that can be just guarded by #if.
      
      But it is actually useful to also test the UDL variant without space between
      closing " and _, so I've added new test coverage for that too to both tests.
      
      2024-10-04  Jakub Jelinek  <jakub@redhat.com>
      
      	* g++.dg/cpp26/unevalstr1.C: Revert the 2024-10-03 changes, instead
      	expect extra warnings.  Add another set of tests without space
      	between " and _.
      	* g++.dg/cpp26/unevalstr2.C: Expect extra warnings for C++23.  Add
      	another set of tests without space between " and _.
      c679cafb
    • Kyrylo Tkachov's avatar
      aarch64: Set Armv9-A generic L1 cache line size to 64 bytes · f000cb8c
      Kyrylo Tkachov authored
      
      I'd like to use a value of 64 bytes for the L1 cache size for Armv9-A
      generic tuning.
      As described in g:9a99559a this value is used
      to set the std::hardware_destructive_interference_size value which we want to
      be not overly large when running concurrent applications on large core-count
      systems.
      
      The generic value for Armv8-A systems and the port baseline is 256 bytes
      because that's what the A64FX CPU has, as set de-facto in
      aarch64_override_options_internal.
      
      But for Armv9-A CPUs as far as I know there isn't anything larger
      than 64 bytes, so we should be able to use the smaller value here and reduce
      the size of concurrent structs that use
      std::hardware_destructive_interference_size to pad their fields.
      
      Bootstrapped and tested on aarch64-none-linux-gnu.
      
      Signed-off-by: default avatarKyrylo Tkachov <ktkachov@nvidia.com>
      
      	* config/aarch64/tuning_models/generic_armv9_a.h
      	(generic_armv9a_prefetch_tune): Define.
      	(generic_armv9_a_tunings): Use the above.
      f000cb8c
    • Jonathan Wakely's avatar
      libstdc++: Fix some Parallel Mode testsuite failures · e1205218
      Jonathan Wakely authored
      Some of these are due to no longer using #pragma GCC system_header in
      libstdc++ headers, some have been failing for longer and weren't
      noticed.
      
      libstdc++-v3/ChangeLog:
      
      	* include/parallel/algobase.h (search): Use sequential algorithm
      	for constant evaluation.
      	* include/parallel/algorithmfwd.h (search): Add
      	_GLIBCXX20_CONSTEXPR.
      	* include/parallel/multiway_merge.h: Remove stray semi-colon.
      	* include/parallel/multiseq_selection.h: Add diagnostic pragmas
      	for -Wlong-long warning.
      	* include/parallel/quicksort.h: Likewise.
      	* include/parallel/random_number.h: Likewise.
      	* include/parallel/settings.h: Likewise.
      	* include/parallel/workstealing.h: Replace ++ and -- on volatile
      	variables.
      	* testsuite/17_intro/names.cc: Skip names defined by
      	<tr1/random>.
      	* testsuite/20_util/pair/dangling_ref.cc: Skip test if Parallel
      	Mode is enabled.
      	* testsuite/20_util/tuple/dangling_ref.cc: Likewise.
      e1205218
    • Andre Vieira's avatar
      arm: Fix missed CE optimization for armv8.1-m.main [PR 116444] · 7766a2c1
      Andre Vieira authored
      This patch restores missed optimizations for armv8.1-m.main targets that were
      missed when the generation of csinc, csinv and csneg were enabled for the same
      with patch series containing:
      
      commit c2bb84be
      Author: Sudi Das <sudi.das@arm.com>
      Date:   Fri Sep 18 15:47:46 2020 +0100
      
          [PATCH 2/5][Arm] New pattern for CSINV instructions
      
      The original patch series makes use of the "noce" machinery to transform RTL
      into patterns that later match the Armv8.1-M Mainline, by getting the target
      hook TARGET_HAVE_CONDITIONAL_EXECUTION, to return FALSE for such targets prior
      to reload_completed.  The same machinery however was transforming other RTL
      patterns which were later on causing the "ce" pass post reload_completed to no
      longer optimize conditional execution opportunities, which was causing the
      regression observed in PR target/116444, a regression of 'testsuite/gcc.target/arm/thumb-ifcvt-2.c'
      when ran for an Armv8.1-M Mainline target.
      
      This patch implements the target hook TARGET_NOCE_CONVERSION_PROFITABLE_P to
      only allow "noce" to generate patterns that match CSINV, CSINC and CSNEG.  Thus
      ensuring that the early "ce" passes do not ruin things for later ones.
      
      gcc/ChangeLog:
      
      	PR target/116444
      	* config/arm/arm-protos.h (arm_noce_conversion_profitable_p): New
      	declaration.
      	* config/arm/arm.cc (arm_is_v81m_cond_insn): New helper function used
      	in ...
      	(arm_noce_conversion_profitable_p): ... here. New function to implement
      	...
      	(TARGET_NOCE_PROFITABLE_P): ... this target hook.  New define.
      7766a2c1
    • Richard Biener's avatar
      Fixup dumping of re-trying without/with single-lane SLP · 16cd00a1
      Richard Biener authored
      The following fixes the order of decrementing the SLP mode and
      the dumping.
      
      	* tree-vect-loop.cc (vect_analyze_loop_2): Derement 'slp'
      	before dumping which stage we're starting.
      16cd00a1
    • Jakub Jelinek's avatar
      diagnostic, pch: Fix up the new diagnostic PCH methods for ubsan checking [PR116936] · f82055f8
      Jakub Jelinek authored
      The PR notes that the new pch_save/pch_restore methods I've added
      recently invoke UB if either m_classification_history.address ()
      or m_push_list.address () is NULL (which can happen if those vectors
      are empty (and in the pch_save case nothing has been pushed into them
      before either).  While the corresponding length is necessarily 0,
      fwrite (NULL, something, 0, f) or
      fread (NULL, something, 0, f) still invoke UB.
      
      The following patch fixes that by not calling fwrite/fread if the
      corresponding length is 0.
      
      2024-10-04  Jakub Jelinek  <jakub@redhat.com>
      
      	PR pch/116936
      	* diagnostic.cc (diagnostic_option_classifier::pch_save): Only call
      	fwrite if corresponding length is non-zero.
      	(diagnostic_option_classifier::pch_restore): Only call fread if
      	corresponding length is non-zero.
      f82055f8
    • Jakub Jelinek's avatar
      i386: Fix up ix86_expand_int_compare with TImode comparisons of SUBREGs from... · 92e9e971
      Jakub Jelinek authored
      i386: Fix up ix86_expand_int_compare with TImode comparisons of SUBREGs from V8{H,B}Fmode against zero [PR116921]
      
      The following testcase ICEs, because the ix86_expand_int_compare
      optimization to use {,v}ptest assumes there are instructions for all
      16-byte vector modes.  That isn't the case, we only have one for
      V16QI, V8HI, V4SI, V2DI, V1TI, V4SF and V2DF, not for
      V8HF nor V8BF.
      
      The following patch fixes that by using the V8HI instruction instead
      for those 2 modes.  tmp can't be a SUBREG, because it is SUBREG_REG
      of another SUBREG, so we don't need to worry about gen_lowpart
      failing.
      
      2024-10-04  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/116921
      	* config/i386/i386-expand.cc (ix86_expand_int_compare): Add a SUBREG
      	to V8HImode from V8HFmode or V8BFmode before generating a ptest.
      
      	* gcc.target/i386/pr116921.c: New test.
      92e9e971
    • Jakub Jelinek's avatar
      i386: Fix up *minmax<mode>3_2 splitter [PR116925] · 67b750c2
      Jakub Jelinek authored
      While *minmax<mode>3_1 correctly uses
         if (MEM_P (operands[1]))
           operands[1] = force_reg (<MODE>mode, operands[1]);
      to ensure operands[1] is not a MEM, *minmax<mode>3_2 does it wrongly
      by calling force_reg but ignoring its return value.
      
      The following borderingly obvious patch fixes that.
      
      Didn't find similar other errors in the backend with force_reg calls.
      
      2024-10-04  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/116925
      	* config/i386/sse.md (*minmax<mode>3_2): Assign force_reg result
      	back to operands[2] instead of throwing it away.
      
      	* g++.target/i386/avx-pr116925.C: New test.
      67b750c2
    • Nathaniel Shead's avatar
      c++: Allow references to internal-linkage vars in C++11 [PR113266] · 247643c7
      Nathaniel Shead authored
      
      [temp.arg.nontype] changed in C++11 to allow naming internal-linkage
      variables and functions.  We currently already handle internal-linkage
      functions, but variables were missed; this patch updates this.
      
      	PR c++/113266
      	PR c++/116911
      
      gcc/cp/ChangeLog:
      
      	* parser.cc (cp_parser_template_argument): Allow
      	internal-linkage variables since C++11.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/nontype6.C: New test.
      
      Signed-off-by: default avatarNathaniel Shead <nathanieloshead@gmail.com>
      247643c7
    • Nathaniel Shead's avatar
      c++: Return the underlying decl rather than the USING_DECL from update_binding [PR116913] · 6a1e1091
      Nathaniel Shead authored
      
      Users of pushdecl assume that the returned decl will be a possibly
      updated decl matching the one that was passed in.  My r15-3910 change
      broke this since in some cases we would now return USING_DECLs; this
      patch fixes the situation.
      
      	PR c++/116913
      
      gcc/cp/ChangeLog:
      
      	* name-lookup.cc (update_binding): Return the strip_using'd old
      	decl rather than the binding.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/lookup/using70.C: New test.
      
      Signed-off-by: default avatarNathaniel Shead <nathanieloshead@gmail.com>
      6a1e1091
    • Richard Biener's avatar
      Relax gcc.dg/vect/pr65947-8.c · 7fb65266
      Richard Biener authored
      When failing using forced SLP we do not print the non-SLP failure
      mode which reads slightly different.  Massage the expectation a bit.
      
      	* gcc.dg/vect/pr65947-8.c: Adjust.
      7fb65266
    • Jonathan Wakely's avatar
      libstdc++: Replace implicit lambda capture of 'this' [PR116964] · f135278f
      Jonathan Wakely authored
      C++20 deprecates implicit capture of 'this', so change [=] to [this] for
      all lambda expressions in <shared_mutex>. This only shows up on targets
      where _GLIBCXX_USE_PTHREAD_RWLOCK_T is not defined, as we have an
      alternative implementation of shared mutexes in that case.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/116964
      	* include/std/shared_mutex (__shared_mutex_cv): Use [this] for
      	lambda captures.
      	(shared_timed_mutex) [!_GLIBCXX_USE_PTHREAD_RWLOCK_T]: Likewise.
      f135278f
    • Richard Biener's avatar
      tree-optimization/99856 - fix testcase · a96ebb2c
      Richard Biener authored
      When making the testcase use aligned accesses I botched up the
      copy&paste.  Fixed.
      
      	PR tree-optimization/99856
      	* gcc.dg/vect/pr99856.c: Fix copy&paste errors.
      a96ebb2c
    • Sam James's avatar
      testsuite: fix two newly-running -Wstringop-overflow test directives · 0fae1550
      Sam James authored
      This didn't show up until the previous commit which fixed the directive
      syntax. The indexing was off for the notes.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/Wstringop-overflow-79.c: Fix index for notes.
      	* gcc.dg/Wstringop-overflow-80.c: Ditto.
      0fae1550
    • Sam James's avatar
      testsuite: add missing braces around dejagnu directives · a2b7a6fe
      Sam James authored
      gcc/testsuite/ChangeLog:
      
      	* c-c++-common/analyzer/flex-without-call-summaries.c: Add missing brace.
      	* c-c++-common/analyzer/malloc-callbacks.c: Ditto.
      	* gcc.dg/Wstringop-overflow-79.c: Ditto.
      	* gcc.dg/Wstringop-overflow-80.c: Ditto.
      a2b7a6fe
    • Georg-Johann Lay's avatar
      testsuite - Fix gcc.c-torture/execute/ieee/pr108540-1.c · a0cc6941
      Georg-Johann Lay authored
      	  PR testsuite/108540
      gcc/testsuite/
      	* gcc.c-torture/execute/ieee/pr108540-1.c: Un-preprocess
      	__SIZE_TYPE__ and __INT64_TYPE__.
      	* gcc.c-torture/execute/ieee/pr108540-1.x: New file, requires double64.
      a0cc6941
    • Gerald Pfeifer's avatar
      doc: Drop GCC 2.6 ABI change note for H8/h8300-hms · 186be7f3
      Gerald Pfeifer authored
      gcc:
      	PR target/69374
      	* doc/install.texi (Specific) <h8300-hms>: Drop GCC 2.6
      	ABI change note.
      186be7f3
    • Sam James's avatar
      gcc: fix typo in gimplify · 4f0026c2
      Sam James authored
      gcc/ChangeLog:
      
      	* gimplify.cc (gimple_add_init_for_auto_var): Fix 'variable' typo.
      4f0026c2
    • Sam James's avatar
      testsuite: gnat.dg: fix dg-do directive syntax · 68d88d9b
      Sam James authored
      Fix incorrect use of '[' rather than '{' in 'dg-...' directives.
      
      gcc/testsuite/ChangeLog:
      
      	* gnat.dg/pack13.adb: Fix 'dg-...' directive syntax.
      	* gnat.dg/size_attribute.adb: Ditto.
      	* gnat.dg/subp_elim_errors.adb: Ditto.
      68d88d9b
    • Jason Merrill's avatar
      c++: record template specialization hash · 5dad738c
      Jason Merrill authored
      
      A lot of compile time of template-heavy code is spent in re-hashing
      hashtable elements upon expansion.  The following records the hash in the
      hash element.  This speeds up C++20 compilation of stdc++.h by about 25% for
      about a 0.1% increase in memory usage.
      
      With the hash value in the entry, we don't need to pass it separately to the
      find functions.
      
      Adding default arguments to the spec and hash fields simplifies spec_entry
      initialization and avoids problems from hash starting with an indeterminate
      value.
      
      gcc/cp/ChangeLog:
      
      	* cp-tree.h (spec_entry::hash): New member.
      	* pt.cc (spec_hasher::hash): Set it and return it.
      	(maybe_process_partial_specialization): Clear it when
      	changing tmpl/args.
      	(lookup_template_class): Likewise, don't pass hash to find.
      	(retrieve_specialization): Set it, don't pass hash to find.
      	(register_specialization): Don't pass hash to find.
      	(reregister_specialization): Likewise.
      	(match_mergeable_specialization): Likewise.
      	(add_mergeable_specialization): Likewise.
      
      Co-authored-by: default avatarRichard Biener <rguenther@suse.de>
      5dad738c
    • GCC Administrator's avatar
      Daily bump. · e175fb38
      GCC Administrator authored
      e175fb38
  3. Oct 03, 2024
    • Jason Merrill's avatar
      c++: free garbage vec in coerce_template_parms · d77f073c
      Jason Merrill authored
      
      coerce_template_parms can create two different vecs for the inner template
      arguments, new_inner_args and (potentially) the result of
      expand_template_argument_pack.  One or the other, or possibly both, end up
      being garbage: in the typical case, the expanded vec is garbage because it's
      only used as the source for convert_template_argument.  In some dependent
      cases, the new vec is garbage because we decide to return the original args
      instead.  In these cases, ggc_free the garbage vec to reduce the memory
      overhead of overload resolution.
      
      gcc/cp/ChangeLog:
      
      	* pt.cc (coerce_template_parms): Free garbage vecs.
      
      Co-authored-by: default avatarRichard Biener <rguenther@suse.de>
      d77f073c
    • Eric Botcazou's avatar
      Aarch64: Define WIDEST_HARDWARE_FP_SIZE · 547219f4
      Eric Botcazou authored
      The macro is documented like this in the internal manual:
      
       -- Macro: WIDEST_HARDWARE_FP_SIZE
           A C expression for the size in bits of the widest floating-point
           format supported by the hardware.  If you define this macro, you
           must specify a value less than or equal to mode precision of the
           mode used for C type 'long double' (from hook
           'targetm.c.mode_for_floating_type' with argument
           'TI_LONG_DOUBLE_TYPE').  If you do not define this macro, mode
           precision of the mode used for C type 'long double' is the default.
      
      AArch64 uses 128-bit TFmode for long double but, as far as I know, no FPU
      implemented in hardware supports it.
      
      gcc/
      	* config/aarch64/aarch64.h (WIDEST_HARDWARE_FP_SIZE): Define to 64.
      
      gcc/testsuite/
      	* gnat.dg/specs/size_clause6.ads: New test.
      547219f4
    • Jason Merrill's avatar
      Revert "c++: free garbage vec in coerce_template_parms" · fe33530e
      Jason Merrill authored
      This broke bootstrap, improving.
      
      This reverts commit 5b08ae50.
      fe33530e
    • Jason Merrill's avatar
      c++: -Wdeprecated enables later standard deprecations · dca2b479
      Jason Merrill authored
      By default -Wdeprecated warns about deprecations in the active standard.
      When specified explicitly, let's also warn about deprecations in later
      standards.
      
      gcc/c-family/ChangeLog:
      
      	* c-opts.cc (c_common_post_options): Explicit -Wdeprecated enables
      	deprecations from later standards.
      
      gcc/ChangeLog:
      
      	* doc/invoke.texi: Explicit -Wdeprecated enables more warnings.
      dca2b479
    • Jason Merrill's avatar
      c++: add -Wdeprecated-literal-operator [CWG2521] · b6ff52a9
      Jason Merrill authored
      C++23 CWG issue 2521 (https://wg21.link/cwg2521) deprecates user-defined
      literal operators declared with the optional space between "" and the
      suffix.
      
      Many testcases used that syntax; I removed the space from most of them, and
      added C++23 warning tests to a few.
      
      	CWG 2521
      
      gcc/ChangeLog:
      
      	* doc/invoke.texi: Document -Wdeprecated-literal-operator.
      
      gcc/c-family/ChangeLog:
      
      	* c.opt: Add -Wdeprecated-literal-operator.
      	* c-opts.cc (c_common_post_options): Default on in C++23.
      	* c.opt.urls: Regenerate.
      
      gcc/cp/ChangeLog:
      
      	* parser.cc (location_between): New.
      	(cp_parser_operator): Handle -Wdeprecated-literal-operator.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/udlit-string-literal.h
      	* g++.dg/cpp0x/Wliteral-suffix2.C
      	* g++.dg/cpp0x/constexpr-55708.C
      	* g++.dg/cpp0x/gnu_fext-numeric-literals.C
      	* g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C
      	* g++.dg/cpp0x/pr51420.C
      	* g++.dg/cpp0x/pr60209-neg.C
      	* g++.dg/cpp0x/pr60209.C
      	* g++.dg/cpp0x/pr61038.C
      	* g++.dg/cpp0x/std_fext-numeric-literals.C
      	* g++.dg/cpp0x/std_fno-ext-numeric-literals.C
      	* g++.dg/cpp0x/udlit-addr.C
      	* g++.dg/cpp0x/udlit-args-neg.C
      	* g++.dg/cpp0x/udlit-args.C
      	* g++.dg/cpp0x/udlit-args2.C
      	* g++.dg/cpp0x/udlit-clink-neg.C
      	* g++.dg/cpp0x/udlit-concat-neg.C
      	* g++.dg/cpp0x/udlit-concat.C
      	* g++.dg/cpp0x/udlit-constexpr.C
      	* g++.dg/cpp0x/udlit-cpp98-neg.C
      	* g++.dg/cpp0x/udlit-declare-neg.C
      	* g++.dg/cpp0x/udlit-embed-quote.C
      	* g++.dg/cpp0x/udlit-extended-id-1.C
      	* g++.dg/cpp0x/udlit-extended-id-3.C
      	* g++.dg/cpp0x/udlit-extern-c.C
      	* g++.dg/cpp0x/udlit-friend.C
      	* g++.dg/cpp0x/udlit-general.C
      	* g++.dg/cpp0x/udlit-implicit-conv-neg-char8_t.C
      	* g++.dg/cpp0x/udlit-implicit-conv-neg.C
      	* g++.dg/cpp0x/udlit-inline.C
      	* g++.dg/cpp0x/udlit-mangle.C
      	* g++.dg/cpp0x/udlit-member-neg.C
      	* g++.dg/cpp0x/udlit-namespace.C
      	* g++.dg/cpp0x/udlit-nofunc-neg.C
      	* g++.dg/cpp0x/udlit-nonempty-str-neg.C
      	* g++.dg/cpp0x/udlit-nosuffix-neg.C
      	* g++.dg/cpp0x/udlit-nounder-neg.C
      	* g++.dg/cpp0x/udlit-operator-neg.C
      	* g++.dg/cpp0x/udlit-overflow-neg.C
      	* g++.dg/cpp0x/udlit-overflow.C
      	* g++.dg/cpp0x/udlit-preproc-neg.C
      	* g++.dg/cpp0x/udlit-raw-length.C
      	* g++.dg/cpp0x/udlit-raw-op-string-neg.C
      	* g++.dg/cpp0x/udlit-raw-op.C
      	* g++.dg/cpp0x/udlit-raw-str.C
      	* g++.dg/cpp0x/udlit-resolve-char8_t.C
      	* g++.dg/cpp0x/udlit-resolve.C
      	* g++.dg/cpp0x/udlit-shadow-neg.C
      	* g++.dg/cpp0x/udlit-string-length.C
      	* g++.dg/cpp0x/udlit-suffix-neg.C
      	* g++.dg/cpp0x/udlit-template.C
      	* g++.dg/cpp0x/udlit-tmpl-arg-neg.C
      	* g++.dg/cpp0x/udlit-tmpl-arg-neg2.C
      	* g++.dg/cpp0x/udlit-tmpl-arg.C
      	* g++.dg/cpp0x/udlit-tmpl-parms-neg.C
      	* g++.dg/cpp0x/udlit-tmpl-parms.C
      	* g++.dg/cpp1y/pr57640.C
      	* g++.dg/cpp1y/pr88872.C
      	* g++.dg/cpp26/unevalstr1.C
      	* g++.dg/cpp2a/concepts-pr60391.C
      	* g++.dg/cpp2a/consteval-prop21.C
      	* g++.dg/cpp2a/nontype-class6.C
      	* g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C
      	* g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C
      	* g++.dg/cpp2a/udlit-class-nttp-ctad.C
      	* g++.dg/cpp2a/udlit-class-nttp-neg.C
      	* g++.dg/cpp2a/udlit-class-nttp-neg2.C
      	* g++.dg/cpp2a/udlit-class-nttp.C
      	* g++.dg/ext/is_convertible2.C
      	* g++.dg/lookup/pr87269.C
      	* g++.dg/cpp0x/udlit_system_header: Adjust for C++23 deprecated
      	operator "" _suffix.
      	* g++.dg/DRs/dr2521.C: New test.
      b6ff52a9
Loading