This patch resolves the P4 regression PR c/123716.
2026-02-22 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog
PR c/123716
* tree.cc (tree_nop_conversion_p): Move sanity checks on
inner_type to here...
(tree_nop_conversion): ... from here.
gcc/testsuite/ChangeLog
PR c/123716
* gcc.dg/pr123716.c: New test case.
This new test makes sure that the bounds are adjusted while trimming
dimensions of multiples with implicit lower and implicit upper bounds.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/testsuite/ChangeLog
* algol68/execute/trimmer-12.a68: New test.
The following testcase is rejected since my recent convert_nontype_argument
change, but only in C++11/14 modes.
The problem is that C++17 says that all NTTPs should be converted constant
expressions, but C++11 only said that for integral and enumeration ones and
something that applied to the decltype(nullptr) case was
- a constant expression that evaluates to a null pointer value
The problem is that for NULLPTR_TYPE_P for C++11/14, we just never called
maybe_constant_value, so obviously just making sure it is integer_zerop and
without tf_error returning NULL_TREE otherwise changes behavior on valid
programs, we really need to constant evaluate it first.
The following patch fixes that.
I'm afraid I actually don't know what exactly C++14 specifies, whether I've
grabbed a pre-C++14 or post-C++14 draft, which looked like the C++17
wording. So, if C++14 needs something different, we'll need a further
change, but this at least fixes the regression.
2026-02-22 Jakub Jelinek <jakub@redhat.com>
PR c++/124173
* pt.cc (convert_nontype_argument): For C++11/C++14 handle
NULLPTR_TYPE_P non-type arguments like TYPE_PTR_P.
* g++.dg/cpp0x/pr124173.C: New test.
Barry Revzin mentioned in private mail that we reject the following
testcase even when it should be accepted.
The problem is that I thought finish_call_expr with tf_none would
be just harmless, but it is not, it can result in errors while trying
to instantiate something else (e.g. the noexcept).
So, instead of doing finish_call_expr with tf_none and only if that
returns error_mark_node calling it again with tf_any_viable, the
following patch just calls it only with tf_any_viable immediately.
2026-02-22 Jakub Jelinek <jakub@redhat.com>
PR c++/124184
* parser.cc (cp_perform_range_for_lookup): If tf_error is
missing, call finish_call_expr after perform_koenig_lookup
calls immediately with tf_any_viable instead of twice, once
with tf_none and then with tf_any_viable.
* pt.cc (finish_expansion_stmt): Remove unneeded parens.
* g++.dg/cpp26/expansion-stmt31.C: New test.
When doing directives-only processing (-E -fdirectives-only, or -M) we
crash if we hit an unexpected CPP_PRAGMA_EOL because we 'know' we're in
a module directive but the in_deferred_pragma flag is no longer set.
Fixed by undoing the "finished a module directive" behaviour within
cpp_maybe_module_directive if we're bailing due to an ill-formed peeked
token.
PR c++/124153
libcpp/ChangeLog:
* lex.cc (cpp_maybe_module_directive): Set in_deferred_pragma
and eol when we see an unexpected CPP_PRAGMA_EOL.
gcc/testsuite/ChangeLog:
* g++.dg/modules/cpp-22.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
When using -fsearch-include-path, we prepend the result of
search_path_head to the provided filenames, which for non-absolute paths
will return "./". At this point, stdin is represented by the empty
string, and so prepending "./" confuses 'open_file'. This patch fixes
the issue by treating stdin as-if it were an absolute path.
PR c++/119756
libcpp/ChangeLog:
* files.cc (search_path_head): Also treat empty string (stdin)
as an absolute path.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
The driver uses the 'join' function to calculate the default output for
the -fdeps-file and -fdeps-target parameters from the parameter given to
-o (or the basename of the input file). But if the path given to -o has
any whitespace in it this causes cc1plus to see arguments like
"-o some file.o" "-fdeps-file=some" "file.ddi"
which breaks. Fixed by adjusting the 'join' function to escape any
special characters in the result.
PR c++/120974
gcc/ChangeLog:
* gcc.cc (join_spec_func): Escape special characters.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
Fixes a bogus "'Cls::<unnamed union>' is not a base of 'const Cls'" error
when user tries to do a class member lookup using splice with reflection of
anon union member.
PR c++/123642
gcc/cp/ChangeLog:
* typeck.cc (finish_class_member_access_expr): Change context lookup
to handle anon union members.
gcc/testsuite/ChangeLog:
* g++.dg/reflect/member4.C: Remove expected error.
* g++.dg/reflect/anon4.C: New test based on original bug report.
Signed-off-by: Valentyn Yukhymenko <valentin.yukhymenko@gmail.com>
The restriction is implementation defined and only enforced at compile
time by GNAT, so Storage_Error is never raised at run time.
gcc/ada
PR ada/124192
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
(Max_Tasks): Adjust description.
* gnat_rm.texi: Regenerate.
This is really a corner case, but it exposes a couple of small issues in
Analyze_Triggering_Alternative that are worth fixing: 1) the detection of
delay and entry call statements is not robust enough and 2) there is also
a thinko in the detection of procedure call statements.
gcc/ada/
PR ada/124179
* sem_ch9.adb (Analyze_Triggering_Alternative): Use more robust
test for delay and entry call statements and fix thinko in test
for procedure call statements.
gcc/testsuite/
* gnat.dg/asynch2.adb: New test.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-low-units.cc (lower_subscript_for_trimmers): Do not crash
with trimmers with implicit lower and upper bounds.
gcc/testsuite/ChangeLog
* algol68/execute/trimmer-11.a68: New test.
When updating the value of the stack pointer through a sequence of instruc-
tions, only the last instruction in the sequence must modify the stack
pointer, because the stack pointer may be referenced by an interrupt or
other event during the sequence:
/* example */
register void *stack_ptr asm ("a1");
void test(void) {
stack_ptr = (void *)0x04000000;
}
;; before (-O -mabi=call0)
test:
movi.n sp, 1 ;; An interrupt may occur
slli sp, sp, 26 ;; between these instructions
ret.n
This patch avoids this problem by excluding constant value assignments to
the stack pointer from 'constantsynth'.
;; after (-O -mabi=call0)
.literal_position
.literal .LC0, 67108864
test:
l32r sp, .LC0
ret.n
gcc/ChangeLog:
* config/xtensa/xtensa.cc (constantsynth_pass1):
Add the case where the assignment destination is a stack pointer
to the exclusion criteria for processing.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-imports-archive.cc (Archive_file::initialize_big_archive):
Fix formatting tag in call to a68_error.
The function a68_mode_error_text computes a string that is then passed
to a68_error or a68_warning. The later functions feed the resulting
string to the diagnostics machinery, which knows how to handle %< and
%>, but the *printf calls don't. Therefore the %s have to be escaped
for %< and %> to be interpreted literally.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
* a68-moids-diagnostics.cc (a68_mode_error_text): Properly escape
%< and %> in snprintf calls.
In the past few bootstraps/regtests, I got occassionally one random FAIL
in libgomp testsuite, and the log said in each of the cases something like
obj02/x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.log:/usr/bin/ld: error: /home/jakub/src/gcc/obj02/gcc/libatomic.so: file too short
obj02/x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.log:/usr/bin/ld: error: /home/jakub/src/gcc/obj02/gcc/libatomic.so: file too short
obj05/i686-pc-linux-gnu/libgomp/testsuite/libgomp.log:/home/jakub/src/gcc/obj05/gcc/libatomic.so: file not recognized: file format not recognized
obj05/i686-pc-linux-gnu/libgomp/testsuite/libgomp.log:/home/jakub/src/gcc/obj05/gcc/libatomic.so: file not recognized: file format not recognized
I think what happens is that make check in libgomp and make check
in libatomic directories happen concurrently and in libatomic
there is the check -> check_recursive -> check-am -> all-am -> all-local
chain of dependencies. And all-local is like many other automake goals
.PHONY, so even when it depends on libatomic.la, it is reexecuted each time
and each time attempts to install libatomic*.{so,a}* again, which can race
with make check in other directories.
The following patch fixes it by just adding dependency for all-local
on stmp-libatomic file and only rule for that file dependent on libatomic.la
and performing the installation. So, if libatomic.la is not relinked, nothing
is reinstalled.
2026-02-21 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (all-local): Depend on stmp-libatomic and otherwise
do nothing.
(stmp-libatomic): New goal, move all commands from all-local here plus
touch $@ at the end.
* Makefile.in: Regenerate.
This commit changes the Algol 68 front-end diagnostics so it uses
regular format strings as recognized as pp_format, instead of the
upper-letter tags inherited from Genie.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-pretty-print.h: New file.
* a68.h: Mark prototypes of diagnostic functions with
ATTRIBUTE_A68_DIAG.
* a68-diagnostics.cc (diagnostic): Do not translate upper-case
tags and pass a copy of the va_list `args' to diagnostic_set_info.
Mark with ATTRIBUTE_A68_DIAG.
* a68-imports-archive.cc: Convert to use standard error format
tags.
* a68-parser-victal.cc: Likewise.
* a68-parser-top-down.cc: Likewise.
* a68-parser-taxes.cc: Likewise.
* a68-parser-scanner.cc: Likeise.
* a68-parser-moids-check.cc: Likewise.
* a68-parser-modes.cc: Likewise.
* a68-parser-extract.cc: Likewise.
* a68-parser-pragmat.cc: Likewise.
* a68-parser-scope.cc: Likewise.
* a68-parser-brackets.cc: Likewise.
* a68-parser-bottom-up.cc: LIkewise.
* a68-moids-diagnostics.cc: Likewise.
* a68-imports.cc: Likewise.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-low.cc (a68_make_formal_hole_decl): Get a boolean indicating
whether the declaration is for the address of the given symbol.
* a68.h: Update prototype of a68_make_formal_hole_decl.
* a68-low-holes.cc (a68_wrap_formal_var_hole): Pass a boolean to
a68_make_formal_hole_decl indicating whether an address is
required.
This big commit:
* Adds support to the FFI mechanism to map Algol 68 procedures
returning strings to an equivalent C interface.
* Adds a new command-line option -fbuilding-libga68.
* Adds support for having modules in libga68 implicitly invoked in
user-written programs and modules.
* Using the infrastructure agove, removes the compiler-generated glue
to call the standard POSIX prelude shipped in libga68 to, instead, use
the formal holes mechanism for FFI.
* Adds posix.a68 to libga68.
* Adds standard.a68 to libga68.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-moids-misc.cc (a68_is_c_mode): Allow C formal holes for
routines yielding strings.
* a68-low-holes.cc (a68_wrap_formal_proc_hole): Support wrappers
that yield strings.
* a68.h: Remove a68_posix_* and a68_lower_posix* prototypes.
* a68-low-posix.cc: Remove.
* a68-imports.cc (a68_open_packet): Get argument filename.
* Make-lang.in (ALGOL68_OBJS): Remove algol68/a68-low-posix.o.
* a68-low-runtime.def: Remove POSIX_*.
* lang.opt (-fcheck): Add new undocumented option -fbuilding-libga68.
* a68-parser-prelude.cc (stand_transput): New function.
(posix_prelude): Remove hardcoded additions to the top-level
environment and use a68_extract_revelations instead.
* a68-parser-extract.cc (a68_extract_revelation): Renamed from
extract_revelation and made accessible externally.
* a68-low.cc (a68_make_formal_hole_decl): Remove unneeded check.
(lower_lude_decl): New function.
(lower_module_text): Add calls to preludes and postludes of
standard modules if not building libga68.
(a68_lower_particular_program): Likewise.
* a68-low-prelude.cc (a68_lower_posixargc): Remove.
(a68_lower_posixargv): Likewise.
(a68_lower_posixgetenv): Likewise.
(a68_lower_posixputchar): Likewise.
(a68_lower_posixputs): Likewise.
(a68_lower_posixfconnect): Likewise.
(a68_lower_posixfopen): Likewise.
(a68_lower_posixfcreate): Likewise.
(a68_lower_posixfclose): Likewise.
(a68_lower_posixfsize): Likewise.
(a68_lower_posixlseek): Likewise.
(a68_lower_posixseekcur): Likewise.
(a68_lower_posixseekend): Likewise.
(a68_lower_posixseekset): Likewise.
(a68_lower_posixstdinfiledes): Likewise.
(a68_lower_posixstdoutfiledes): Likewise.
(a68_lower_posixstderrfiledes): Likewise.
(a68_lower_posixfileodefault): Likewise.
(a68_lower_posixfileordwr): Likewise.
(a68_lower_posixfileordonly): Likewise.
(a68_lower_posixfileowronly): Likewise.
(a68_lower_posixfileotrunc): Likewise.
(a68_lower_posixerrno): Likewise.
(a68_lower_posixexit): Likewise.
(a68_lower_posixperror): Likewise.
(a68_lower_posixstrerror): Likewise.
(a68_lower_posixfputc): Likewise.
(a68_lower_posixfputs): Likewise.
(a68_lower_posixgetchar): Likewise.
(a68_lower_posixfgetc): Likewise.
(a68_lower_posixgets): Likewise.
(a68_lower_posixfgets): Likewise.
gcc/testsuite/ChangeLog
* lib/algol68.exp (algol68_init): Add -I options to
ALGOL68_UNDER_TEST so exports in libga68.{a,so} are found.
* algol68/compile/warning-hidding-6.a68: Likewise.
* algol68/compile/warning-hidding-5.a68: Use maxint instead of
getchar to trigger the warning.
* algol68/compile/error-nest-4.a68: Procedures yielding strings
are now on in C formal holes.
libga68/ChangeLog
* posix.a68: New file.
* standard.a68.in: Likewise.
* ga68-posix.c (_libga68_stdin): Define.
(_libga68_stdout): Likewise.
(_libga68_stderr): Likewise.
(_libga68_file_o_default): Likewise.
(_libga68_file_o_rdonly): Likewise.
(_libga68_file_o_rdwr): Likewise.
(_libga68_file_o_trunc): Likewise.
(_libga68_seek_cur): Likewise.
(_libga68_seek_end): Likewise.
(_libga68_seek_set): Likewise.
(_libga68_posixstrerror): Update interface to new way of returning
Algol 68 strings.
(_libga68_posixargv): Likewise.
(_libga68_posixfgets): Likewise.
(_libga68_posixgets): Likewise.
(_libga68_posixfopen): Use _libga68_file_o_default rather than FILE_O_DEFAULT.
(_libga68_posixfopen): Ditto for other FILE_O_* values.
* ga68.h: Update prototypes.
* Makefile.am (libga68_la_LIBADD): Add standard.lo.
(libga68_la_DEPENDENCIES): Likeise.
(.a68.o): Pass -fbuilding-libga68.
(.a68.lo): Likewise.
(standard.a68): New rule.
* Makefile.in: Regenerate.
* transput.a68.in: Add Emacs -*- mode: a68 -*- comment.
Until now all the identifiers interned in A68_STANDENV were lowered by
using an explicit lowering routine. This is because the entirely of
the standard preludes were implemented by having the compiler generate
the corresponding code inline. We have a check in place to determine
whether a lowerer has been installed for a given standard construct:
NO_LOWERER. This is a lowerer routine that just prints a message and
ICEs.
We want to write part of the standard preludes in Algol 68. To make
that possible this patch introduces a distinction between NO_LOWERER,
meaning the definition comes from Algol 68 code in the runtime library
and therefore does not use a lowering routine, and LOWERER_UNIMPL,
which means the definition uses a lowering routine but a proper one
has not been written yet.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-types.h (NO_LOWERER): Redefine as NULL.
(LOWERER_UNIMPL): Define.
* a68-parser-prelude.cc (a68_idf): Use LOWERER_UNIMPL instead of
NO_LOWERER.
(a68_prio): Likewise.
(a68_op): Likewise.
* a68-low-units.cc (a68_lower_identifier): Do not assume
declarations in A68_STANDENV all have lowerers.
(a68_lower_formula): Likewise.
(a68_lower_monadic_formula): Likewise.
The compiler tries to find exports data for accessed modules by
trying, in order:
* Standalone files: FOO.m68
* Shared object: libFOO.so
* Archives: libFOO.a
* Object files: FOO.o
This commit adds support for archives. Most of the code is copied
from the go FrontEnd's gcc/go/import-archive.c.
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68-imports.cc (a68_find_export_data): Make visible externally.
(a68_find_export_data): Try reading export data from an archive
file.
* a68.h: Adjust prototype of a68_find_export_data accordingly.
* a68-imports-archive.cc: New file.
* Make-lang.in (ALGOL68_OBJS): Build algol/a68-imports-archive.o.
As discussed in the PR, there's two things we want to do WRT this bug.
First, we want to bullet-proof this loop. It's trying to find an insertion
point, but can run off the end of the insn chain in the process. That's enough
to fix the regression and the purpose of this patch.
For gcc-17 Richard S. has a more invasive change which fixes the underlying
cause of walking off the end of the insn chain. This patch has the potential
to trigger more combinations which in turn could trip over latent bugs, so we
agreed to defer that fix until the gcc-17 cycle out of an abundance of caution.
My fix has been bootstrapped and regression tested on x86. Pushing to the
trunk.
PR rtl-optimization/123994
gcc/
* rtl-ssa/changes.cc (function_info::verify_insn_changes): Bullet
proof loop to not fault if we run off the end of the insn chain.
gcc/testsuite/
* gcc.dg/torture/pr123994.c: New test.
Trivial fix for a build failure using clang. The argument here is a pointer,
not a location_t.
Pushed to the trunk as obvious.
PR target/124147
gcc/
* config/riscv/riscv.cc (riscv_same_function_versions): Use nullptr_t rather
than UNKNOWN_LOCATION for pointer argument.
Finalize_Pool calls Finalize_And_Deallocate on every subpool handle, but
the parameter is declared with In Out mode, so the call ends up writing
back the updated value into the node that was just deallocated.
gcc/ada/
* libgnat/s-stposu.adb (Finalize_Pool): Pass a local copy of the
handle in the call to Finalize_And_Deallocate.
The error message for an ambiguous pointer function assignment contained a
FIXME and an embedded newline that the diagnostics printer does not handle.
Split the single gfc_error call into a gfc_error for the main diagnostic
and an inform note for the F2008 explanation, wrapped in an
auto_diagnostic_group.
PR fortran/80012
gcc/fortran/ChangeLog:
* symbol.cc (gfc_add_procedure): Split error into gfc_error and
inform using auto_diagnostic_group.
gcc/testsuite/ChangeLog:
* gfortran.dg/pr80012.f90: New test.
Signed-off-by: Gonzalo Silvalde Blanco <gonzalo.silvalde@gmail.com>
Signed-off-by: Christopher Albert <albert@tugraz.at>
PR fortran/123949
gcc/fortran/ChangeLog:
* decl.cc (gfc_get_pdt_instance): Use full integer string encoding
for PDT instance naming rather than 32-bit extraction, which caused
ICEs for valid large KIND values.
gcc/testsuite/ChangeLog:
* gfortran.dg/pdt_85.f03: New test.
* gfortran.dg/pr123949.f90: New test.
The fix for PR113436 introduced a regression causing the
libgomp.c++/target-6.C testcase to fail on some configurations.
This was caused by a change in how is_variable_sized is applied for variables
that are references in private clauses, causing the path that was intended for
variables that are variable-sized in themselves to be taken, instead of
that for referencing a variable-sized object.
2026-02-20 Kwok Cheung Yeung <kcyeung@baylibre.com>
gcc/
PR middle-end/113436
* omp-low.cc (omp_lower_target): Do not check for variable-length
variables in private clauses by reference when allocating memory.
gcc/testsuite/
PR middle-end/113436
* g++.dg/gomp/pr113436-2.C: New.
The following fixes a regression in AVX2 vectorization because on
trunk we are now correctly determine we can shorten a shift operation
but we never really bothered to check we can implement the
resulting operation. With the patch we now check this. For shifts
and rotates we have the choice between vector-vector and vector-scalar
operations which in the end depends on whether we perform SLP or not
and how the shift operand matches up. The patch heuristically
assumes that constant or external shifts can be handled by vector-scalar
operations.
As we were not checking for target support was to allow recursive matching
other patterns, the following still errors on that side in case the
original operation was not supported by the target or it is binary and
the 2nd operand is a constant. This helps avoiding regressions in
gcc.dg/vect/vect-over-widen-13.c and gcc.dg/vect/vect-div-bitmask-1.c
and gcc.target/aarch64/sve2/div-by-bitmask_1.c where the operation in
question is integer division.
PR tree-optimization/124068
* tree-vect-patterns.cc (target_has_vecop_for_code): Move
earlier, add defaulted optab_subtype parameter.
(vect_recog_over_widening_pattern): Check that the target
supports the narrowed operation before committing to the
pattern.
* gcc.target/i386/vect-shift-1.c: New testcase.
PR 122856 shows that when looking at self recursive calls with
self-feeding jump functions, we did consider pass-through functions
but not ancestor functions with zero offsets. This then leads to the
fact that constants which were collected from IPA-CP lattices were not
among those collected from available edges, triggering a verification
assert.
This patch fixes that by also detecting self-feeding ancestor jump
functions.
gcc/ChangeLog:
2026-02-06 Martin Jambor <mjambor@suse.cz>
PR ipa/122856
* ipa-cp.cc (self_recursive_pass_through_p): Test jump function type first.
(self_recursive_ancestor_p): New function.
(find_scalar_values_for_callers_subset): Test also for self-recursive
ancestor jump functions.
(push_agg_values_for_index_from_edge): Likewise.
gcc/testsuite/ChangeLog:
2026-02-06 Martin Jambor <mjambor@suse.cz>
PR ipa/122856
* g++.dg/ipa/pr122856.C: New test.
Fix my broken r16-7593-g39edc2aea24f9a commit which was an incomplete
version of what I originally tested.
libstdc++-v3/ChangeLog:
* testsuite/lib/libstdc++.exp (v3-minimum-std): Remove second
and third args in favour of using globals.
This fixes 2 related bugs. The user marks memmove as noreturn
so when we simplify the memmove to a memory load/store there
is no longer a statement that can alter the CFG and things go
down hill.
The same is true for removing the call in DSE.
So the fix is not to simplify/take into account the call from
gimple-fold and DSE.
changes since v1:
* v2: Use gimple_call_ctrl_altering_p instead of flags.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/121103
gcc/ChangeLog:
* gimple-fold.cc (gimple_fold_call): Don't simplify
noreturn functions.
* tree-ssa-dse.cc (dse_optimize_stmt): Don't handle
calls to noreturn functions.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr121103-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
The cobol.dg/group2 tests are extracted from a list of autotest programs
that are not maintained in the gnu GCC repository. They can be see at
/https://gitlab.cobolworx.com/COBOLworx/gcc-cobol.
Many of these tests have been refined in order to make them work
properly when the exec-charset is ASCII, EBCDIC, or UTF16. The changes
to existing tests seen here largely reflect those changes.
The new files shown below are newly extracted from that same list of
tests.
gcc/testsuite/ChangeLog:
* cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob: Updated.
* cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out: Updated.
* cobol.dg/group2/ALPHABETIC-LOWER_test.cob: Updated.
* cobol.dg/group2/ALPHABETIC-UPPER_test.cob: Updated.
* cobol.dg/group2/ALPHABETIC_test.cob: Updated.
* cobol.dg/group2/Context_sensitive_words__1_.cob: Updated.
* cobol.dg/group2/DEBUG_Line.cob: Updated.
* cobol.dg/group2/DISPLAY__Sign_ASCII.cob: Updated.
* cobol.dg/group2/DISPLAY__Sign_ASCII.out: Updated.
* cobol.dg/group2/DISPLAY__Sign_ASCII__2_.cob: Updated.
* cobol.dg/group2/DISPLAY__Sign_ASCII__2_.out: Updated.
* cobol.dg/group2/EC-BOUND-REF-MOD_checking_process_termination.cob: Updated.
* cobol.dg/group2/FUNCTION_BIGGER-POINTER.cob: Updated.
* cobol.dg/group2/FUNCTION_BYTE-LENGTH.cob: Updated.
* cobol.dg/group2/FUNCTION_BYTE-LENGTH.out: Updated.
* cobol.dg/group2/FUNCTION_CHAR.cob: Updated.
* cobol.dg/group2/FUNCTION_DATE___TIME_OMNIBUS.cob: Updated.
* cobol.dg/group2/FUNCTION_HEX-OF.cob: Updated.
* cobol.dg/group2/FUNCTION_HEX-OF.out: Updated.
* cobol.dg/group2/FUNCTION_ORD.cob: Updated.
* cobol.dg/group2/FUNCTION_ORD.out: Updated.
* cobol.dg/group2/FUNCTION_TEST-DAY-YYYYDDD__2_.cob: Updated.
* cobol.dg/group2/FUNCTION_TEST-FORMATTED-DATETIME_additional.cob: Updated.
* cobol.dg/group2/FUNCTION_as_CALL_parameter_BY_CONTENT.cob: Updated.
* cobol.dg/group2/Hexadecimal_literal.cob: Updated.
* cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.cob: Updated.
* cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.out: Updated.
* cobol.dg/group2/LENGTH_OF_omnibus.cob: Updated.
* cobol.dg/group2/Non-numeric_data_in_numeric_items__2_.cob: Updated.
* cobol.dg/group2/PACKED-DECIMAL_dump.cob: Updated.
* cobol.dg/group2/PACKED-DECIMAL_dump.out: Updated.
* cobol.dg/group2/Refmod__comparisons_inside_numeric-display.cob: Updated.
* cobol.dg/group2/Refmod_sources_are_figurative_constants.cob: Updated.
* cobol.dg/group2/Refmod_sources_are_figurative_constants.out: Updated.
* cobol.dg/group2/debugging_lines__not_active_.cob: Updated.
* cobol.dg/group2/floating-point_SUBTRACT_FORMAT_2.out: Updated.
* cobol.dg/group2/floating-point_literals.out: Updated.
* cobol.dg/group2/37-digit_Initialization_of_fundamental_types.cob: New test.
* cobol.dg/group2/37-digit_Initialization_of_fundamental_types.out: New test.
* cobol.dg/group2/ACCEPT_FROM_ENVIRONMENT-NAME.cob: New test.
* cobol.dg/group2/ACCEPT_FROM_ENVIRONMENT-NAME.out: New test.
* cobol.dg/group2/ACCEPT_foo_FROM_COMMAND-LINE_1_.cob: New test.
* cobol.dg/group2/ADD_1_2_TO_3_GIVING_B.cob: New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9._Without_OPTION_INITIALIZE_Without_-fdefaultbyte___ASCII_.cob:
New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9._Without_OPTION_INITIALIZE_Without_-fdefaultbyte___ASCII_.out:
New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9._Without_OPTION_INITIALIZE_Without_-fdefaultbyte___EBCDIC_.cob:
New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9._Without_OPTION_INITIALIZE_Without_-fdefaultbyte___EBCDIC_.out:
New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9_Without_OPTION_INITIALIZE_With_-fdefaultbyte___UTF16_.cob:
New test.
* cobol.dg/group2/ALLOCATE_Rules_6_-_9_Without_OPTION_INITIALIZE_With_-fdefaultbyte___UTF16_.out:
New test.
* cobol.dg/group2/ANY_LENGTH__7_.cob: New test.
* cobol.dg/group2/ANY_LENGTH__7_.out: New test.
* cobol.dg/group2/Assorted_SPECIAL-NAMES_CLASS.cob: New test.
* cobol.dg/group2/Assorted_SPECIAL-NAMES_CLASS.out: New test.
* cobol.dg/group2/BINARY_and_COMP-5.cob: New test.
* cobol.dg/group2/BINARY_and_COMP-5.out: New test.
* cobol.dg/group2/CDF2_-_DEFINE_FOO_AS_literal-1.cob: New test.
* cobol.dg/group2/CDF2_-_DEFINE_FOO_AS_literal-1.out: New test.
* cobol.dg/group2/CDF2_Trouble_with___IF__1_.cob: New test.
* cobol.dg/group2/CDF2_Trouble_with___IF__2_.cob: New test.
* cobol.dg/group2/CDF2_Trouble_with___IF__2_.out: New test.
* cobol.dg/group2/CDF4_.cob: New test.
* cobol.dg/group2/CDF4_.out: New test.
* cobol.dg/group2/CDF_Feature_.cob: New test.
* cobol.dg/group2/CDF_Feature_.out: New test.
* cobol.dg/group2/CDF_IS_NOT_DEFINED.cob: New test.
* cobol.dg/group2/CDF_IS_NOT_DEFINED.out: New test.
* cobol.dg/group2/CDF__1__IF____text_.cob: New test.
* cobol.dg/group2/CDF__1__IF____text_.out: New test.
* cobol.dg/group2/CDF__2__IF____number_.cob: New test.
* cobol.dg/group2/CDF__2__IF____number_.out: New test.
* cobol.dg/group2/CDF__3__ALL_NUMERIC_COMPARISONS.cob: New test.
* cobol.dg/group2/CDF__3__ALL_NUMERIC_COMPARISONS.out: New test.
* cobol.dg/group2/COMP-5_Sanity_Check_.cob: New test.
* cobol.dg/group2/Complex_HEX__VALUE_and_MOVE_-_ASCII_EBCDIC.cob: New test.
* cobol.dg/group2/Complex_HEX__VALUE_and_MOVE_-_ASCII_EBCDIC.out: New test.
* cobol.dg/group2/Complex_INITIALIZE_with_nested_tables__1_.cob: New test.
* cobol.dg/group2/Complex_INITIALIZE_with_nested_tables__1_.out: New test.
* cobol.dg/group2/Complex_INITIALIZE_with_nested_tables__2_.cob: New test.
* cobol.dg/group2/Complex_INITIALIZE_with_nested_tables__2_.out: New test.
* cobol.dg/group2/Default_Arithmetic__1_.cob: New test.
* cobol.dg/group2/Default_Arithmetic__1_.out: New test.
* cobol.dg/group2/ENTRY_statement.cob: New test.
* cobol.dg/group2/ENTRY_statement.out: New test.
* cobol.dg/group2/EVALUATE__A__OR__a_.cob: New test.
* cobol.dg/group2/EVALUATE__A__OR__a_.out: New test.
* cobol.dg/group2/EVALUATE_condition__1_.cob: New test.
* cobol.dg/group2/EVALUATE_condition__1_.out: New test.
* cobol.dg/group2/FIND-STRING__forward_.cob: New test.
* cobol.dg/group2/FIND-STRING__forward_.out: New test.
* cobol.dg/group2/FIND-STRING__reverse_.cob: New test.
* cobol.dg/group2/FIND-STRING__reverse_.out: New test.
* cobol.dg/group2/FIXED_FORMAT_data_in_cols_73_and_beyond.cob: New test.
* cobol.dg/group2/FIXED_FORMAT_data_in_cols_73_and_beyond.out: New test.
* cobol.dg/group2/FIXED_FORMAT_data_misplaced_asterisk.cob: New test.
* cobol.dg/group2/FUNCTION_CONVERT.cob: New test.
* cobol.dg/group2/FUNCTION_CONVERT.out: New test.
* cobol.dg/group2/Fundamental_INSPECT_BACKWARD_REPLACING.cob: New test.
* cobol.dg/group2/Fundamental_INSPECT_BACKWARD_REPLACING.out: New test.
* cobol.dg/group2/Fundamental_INSPECT_BACKWARD_TALLYING.cob: New test.
* cobol.dg/group2/Fundamental_INSPECT_BACKWARD_TALLYING.out: New test.
* cobol.dg/group2/Fundamental_INSPECT_REPLACING.cob: New test.
* cobol.dg/group2/Fundamental_INSPECT_REPLACING.out: New test.
* cobol.dg/group2/Fundamental_INSPECT_TALLYING.cob: New test.
* cobol.dg/group2/Fundamental_INSPECT_TALLYING.out: New test.
* cobol.dg/group2/INITIALIZE_OCCURS_with_SIGN_LEADING___TRAILING.cob: New test.
* cobol.dg/group2/INITIALIZE_OCCURS_with_SIGN_LEADING___TRAILING.out: New test.
* cobol.dg/group2/INITIALIZE_OCCURS_with_numeric_edited.cob: New test.
* cobol.dg/group2/INITIALIZE_complex_group__1_.cob: New test.
* cobol.dg/group2/INITIALIZE_complex_group__2_.cob: New test.
* cobol.dg/group2/INITIALIZE_complex_group__2_.out: New test.
* cobol.dg/group2/INITIALIZE_group_entry_with_OCCURS.cob: New test.
* cobol.dg/group2/INITIALIZE_of_EXTERNAL_data_items.cob: New test.
* cobol.dg/group2/INITIALIZE_with_-defaultbyte__ASCII_.cob: New test.
* cobol.dg/group2/INITIALIZE_with_-defaultbyte__ASCII_.out: New test.
* cobol.dg/group2/INITIALIZE_with_-defaultbyte__EBCDIC_.cob: New test.
* cobol.dg/group2/INITIALIZE_with_-defaultbyte__EBCDIC_.out: New test.
* cobol.dg/group2/INITIALIZE_with_FILLER.cob: New test.
* cobol.dg/group2/INITIALIZE_with_REDEFINES.cob: New test.
* cobol.dg/group2/INITIALIZE_with_reference_modification.cob: New test.
* cobol.dg/group2/Intrinsic_Function_ABS.cob: New test.
* cobol.dg/group2/Intrinsic_Function_ACOS.cob: New test.
* cobol.dg/group2/Intrinsic_Function_ANNUITY.cob: New test.
* cobol.dg/group2/Intrinsic_Function_DATE-YYYYMMDD.cob: New test.
* cobol.dg/group2/Intrinsic_Function_NUMVAL.cob: New test.
* cobol.dg/group2/Intrinsic_Function_NUMVAL.out: New test.
* cobol.dg/group2/Long_Division.cob: New test.
* cobol.dg/group2/Long_Division.out: New test.
* cobol.dg/group2/MOVE_X_000203_.cob: New test.
* cobol.dg/group2/MOVE_X_000203_.out: New test.
* cobol.dg/group2/MOVE_to_JUSTIFIED_items.cob: New test.
* cobol.dg/group2/MOVE_to_JUSTIFIED_items.out: New test.
* cobol.dg/group2/N-Queens_algorithm.cob: New test.
* cobol.dg/group2/N-Queens_algorithm.out: New test.
* cobol.dg/group2/Numeric_operations__6_.cob: New test.
* cobol.dg/group2/Numeric_operations__6_.out: New test.
* cobol.dg/group2/Preserve_collation_past_a_CALL.cob: New test.
* cobol.dg/group2/Preserve_collation_past_a_CALL.out: New test.
* cobol.dg/group2/RETURN-CODE_moving.cob: New test.
* cobol.dg/group2/RETURN-CODE_nested.cob: New test.
* cobol.dg/group2/SORT__table_sort__2___ASCII_.cob: New test.
* cobol.dg/group2/SORT__table_sort__2___ASCII_.out: New test.
* cobol.dg/group2/SORT__table_sort__2___EBCDIC_.cob: New test.
* cobol.dg/group2/SORT__table_sort__2___EBCDIC_.out: New test.
* cobol.dg/group2/Simple_DEBUG-ITEM.cob: New test.
* cobol.dg/group2/Simple_DEBUG-ITEM.out: New test.
* cobol.dg/group2/Simple_ENVIRONMENT-NAME_with_exception.cob: New test.
* cobol.dg/group2/Simple_ENVIRONMENT-NAME_with_exception.out: New test.
* cobol.dg/group2/UNSTRING_with_refmods.cob: New test.
* cobol.dg/group2/UNSTRING_with_refmods.out: New test.
* cobol.dg/group2/command-line.cob: New test.
* cobol.dg/group2/command-line.out: New test.
* cobol.dg/group2/floating-point_FORMAT_1.cob: New test.
* cobol.dg/group2/floating-point_FORMAT_1.out: New test.
* cobol.dg/group2/floating-point_FORMAT_2.cob: New test.
* cobol.dg/group2/floating-point_FORMAT_2.out: New test.
* cobol.dg/group2/procedure_division_using_by.cob: New test.
* cobol.dg/group2/repository.cob: New test.
* cobol.dg/group2/skipping_at_the_top.cob: New test.
* cobol.dg/group2/source-computer_object-computer_repository__2_.cob: New test.
This implements LWG4383 with LWG4500, LWG4523 follow-up corrections.
This patch changes the constant_wrapper assignments operator (including
compounds), increment and decrement to apply directly to value. In
consequence the operators are only supported for types, for which above
operations can be applied on const value.
libstdc++-v3/ChangeLog:
* include/std/type_traits (_CWOperators::operator++)
(_CWOperators::operator--, _CWOperators::operator+=)
(_CWOperators::operator-=, _CWOperators::operator*=)
(_CWOperators::operator/=, _CWOperators::operator%=)
(_CWOperators::operator&=, _CWOperators::operator|=)
(_CWOperators::operator^=, _CWOperators::operator<<=)
(_CWOperators::operator>>=, constant_wrapper::operator=):
Adjust definitions to apply operator on value.
* testsuite/20_util/constant_wrapper/generic.cc:
Remove test_pseudo_mutator.
* testsuite/20_util/constant_wrapper/instantiate.cc:
Test that operators are not provided if wrapped type
do not support them, or provide mutable operators.
This simplifies the v3-minimum-std procedure slightly, but the main
advantage is making v3_modules_std depend on v3_max_std so that we don't
have to update two separate variables when new effective targets such as
c++29 get added.
libstdc++-v3/ChangeLog:
* testsuite/lib/libstdc++.exp (v3_default_std, v3_max_std): New
global variables.
(v3-minimum-std): Use globals instead of arguments.
(v3_modules_std): Define in terms of $v3_max_std.
(v3-dg-runtest): Use globals instead of local variables. Adjust
call to v3-min-std.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
As Andrew noted in pr124108, the two patterns that reassociate expressions to
expose a rotate hidden by an embedded XOR need to check
type_has_mode_precision_p to avoid an ICE during gimple->RTL expansion.
This adds the necessary checks. Bootstrapped and regression tested on x86.
PR tree-optimization/124108
gcc/
* match.pd (reassociating XOR to expose rotations): Check
type_has_mode_precision_p before simplifying.
gcc/testsuite/
* gcc.dg/torture/pr124108.c: New test.
This is mostly cosmetic. It had to be a macro because a constexpr fn
would need a metafn_info* parameter but that struct comes only after
the %{ %} section in the gperf file, and we can only have one such
section.
gcc/cp/ChangeLog:
* metafns.gperf: Define METAFN_KIND_ARG.
* metafns.h: Regenerate.
* reflect.cc (process_metafunction): Use METAFN_KIND_ARG.
Reviewed-by: Jason Merrill <jason@redhat.com>
That got added with commit r11-4762-g65e82636bcdb72a878c2e53943e71b15dd9fb22d
"PR target/96307: Fix KASAN option checking", and already fixed up in
commit r12-3723-g6e6bf4cd21af39a7923bae007517ab43a4c3b36a
"Fix no_fsanitize_address effective target", but I just realized that on, for
example, standard x86_64-pc-linux-gnu, I'm unexpectedly seeing test cases
UNSUPPORTED, due to the effective-target 'no_fsanitize_address' check failing
with:
Executing on host: [...]/build-gcc/gcc/xgcc -B[...]/build-gcc/gcc/ fsanitize_address3454287.c -fdiagnostics-plain-output -fsanitize=address -Wno-complain-wrong-lang -lm -o fsanitize_address3454287.exe (timeout = 300)
spawn [...]
/usr/bin/ld: cannot find libasan_preinit.o: No such file or directory
/usr/bin/ld: cannot find -lasan: No such file or directory
collect2: error: ld returned 1 exit status
compiler exited with status 1
Notice no setup for paths to build-tree libsanitizer. Need to use a proper
'asan.exp' file with 'asan_init'/'asan_finish' calls to set up linker paths,
etc. -- however, all test cases using effective-target 'no_fsanitize_address'
are compilation test cases, so let's just reflect that in the effective-target
'no_fsanitize_address' check. With that, I then get the desired:
-UNSUPPORTED: gcc.dg/pr91441.c
+PASS: gcc.dg/pr91441.c (test for excess errors)
-UNSUPPORTED: gcc.dg/pr96260.c
+PASS: gcc.dg/pr96260.c (test for excess errors)
-UNSUPPORTED: gcc.dg/pr96307.c
+PASS: gcc.dg/pr96307.c (test for excess errors)
-UNSUPPORTED: gcc.dg/uninit-pr93100.c
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 16)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 26)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 38)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 48)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 61)
+PASS: gcc.dg/uninit-pr93100.c (test for warnings, line 71)
+PASS: gcc.dg/uninit-pr93100.c (test for excess errors)
-UNSUPPORTED: g++.dg/warn/uninit-pr93100.C -std=gnu++20
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 13)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 20)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 31)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 38)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 49)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for warnings, line 56)
+PASS: g++.dg/warn/uninit-pr93100.C -std=gnu++20 (test for excess errors)
[Etc.]
-UNSUPPORTED: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20
+PASS: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20 (test for bogus messages, line 17)
+PASS: g++.dg/warn/uninit-pr95825-1.C -std=gnu++20 (test for excess errors)
[Etc.]
-UNSUPPORTED: gnat.dg/asan1.adb
+PASS: gnat.dg/asan1.adb (test for excess errors)
..., while these remain UNSUPPORTED for targets that don't support
'-fsanitize=address'.
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_no_fsanitize_address): Check 'assembly'
instead of 'executable'.
If tf_error is not set in COMPLAIN, whether NULL_TREE or error_mark_node
is returned doesn't matter.
2026-02-19 Jakub Jelinek <jakub@redhat.com>
* pt.cc (convert_nontype_argument): Clarify return value in function
comment.
Small fix-up for commit r16-7574-g6f777c34c9f221a50d0fc22b70b1cf7dd1fd9101
"cprop_hardreg: Use delete_insn_and_edges instead of delete_insn [PR116053]",
where for certain GCC targets, we see:
[...]gcc/testsuite/gcc.dg/pr116053-1.c:8:6: error: expected declaration specifiers or '...' before '__int128'
PR rtl-optimization/116053
gcc/testsuite/
* gcc.dg/pr116053-1.c: 'dg-require-effective-target int128'.
Compiling GCC with Clang doesn't only yield Clang's warnings but also
warnings about .texi documentation files. In filter-clang-warnings.py
we blacklisted some .texi files. Blacklist all of them.
contrib/ChangeLog:
* filter-clang-warnings.py: Filter out all warnings comming from
files with ".texi" in their name.
Signed-off-by: Filip Kastl <fkastl@suse.cz>
On Wed, Feb 18, 2026 at 10:00:38AM +0100, Uros Bizjak wrote:
> BTW: Maybe IN_RANGE should be used more in this function? IMO,
> "!IN_RANGE (ipar[i], 2,3)" is easier to comprehend.
This patch does that.
2026-02-19 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.cc (avx_vpermilp_parallel): Use IN_RANGE
macro.