aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog58
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/config/riscv/riscv.cc23
-rw-r--r--gcc/config/riscv/riscv.md56
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/decl.cc17
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/m2/ChangeLog64
-rw-r--r--gcc/m2/gm2-compiler/M2Quads.mod4
-rw-r--r--gcc/m2/gm2-compiler/P3Build.bnf20
-rw-r--r--gcc/m2/gm2-compiler/P3SymBuild.def8
-rw-r--r--gcc/m2/gm2-compiler/P3SymBuild.mod16
-rw-r--r--gcc/m2/gm2-compiler/PCBuild.bnf25
-rw-r--r--gcc/m2/gm2-compiler/PCSymBuild.def8
-rw-r--r--gcc/m2/gm2-compiler/PCSymBuild.mod16
-rw-r--r--gcc/m2/gm2-compiler/PHBuild.bnf20
-rw-r--r--gcc/m2/gm2-compiler/SymbolTable.def2
-rw-r--r--gcc/m2/gm2-compiler/SymbolTable.mod52
-rw-r--r--gcc/testsuite/ChangeLog46
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/func_constexpr3.C6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cpp.exp8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/escape-3.i16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr36674.i2
-rw-r--r--gcc/testsuite/gcc.target/riscv/add-synthesis-1.c2
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr120674.c6
-rw-r--r--gcc/testsuite/gcc.target/riscv/pr120811.c3
-rw-r--r--gcc/testsuite/gcc.target/riscv/sum-of-two-s12-const-1.c2
-rw-r--r--gcc/testsuite/gm2/iso/fail/badconst.mod9
-rw-r--r--gcc/testsuite/gm2/iso/fail/badtype.mod11
-rw-r--r--gcc/testsuite/gm2/iso/fail/badvar.mod7
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/init.cc31
-rw-r--r--libstdc++-v3/ChangeLog22
-rw-r--r--libstdc++-v3/include/bits/stl_iterator_base_funcs.h2
35 files changed, 459 insertions, 136 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9167c84..19c28f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,61 @@
+2025-10-13 Shreya Munnangi <smunnangi1@ventanamicro.com>
+
+ PR target/120811
+ * config/riscv/riscv.cc (synthesize_add): Exchange constant terms when
+ generating addi pairs.
+ (synthesize_addsi): Similarly.
+ * config/riscv/riscv.md (addptr<mode>3): New define_expand.
+ (*add<mode>3_const_sum_of_two_s12): Remove pattern.
+
+2025-10-13 Jeff Law <jlaw@ventanamicro.com>
+
+ PR target/120674
+ * config/riscv/riscv.cc (riscv_dwarf_poly_indeterminite_value): Do not
+ set FACTOR to zero, for that case use one instead.
+
+2025-10-13 Pan Li <pan2.li@intel.com>
+
+ * match.pd: Add simplifed pattern for widen_mul based unsigned
+ SAT_MUL.
+
+2025-10-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * ipa-inline.cc (max_count): Remove.
+ (has_nonzero_ipa_profile): New.
+ (inline_small_functions): Update.
+ (dump_inline_stats): Update.
+
+2025-10-13 Robin Dapp <rdapp@ventanamicro.com>
+
+ PR target/118019
+ * internal-fn.cc (get_supported_else_vals): Exit at invalid
+ index.
+ (internal_strided_fn_supported_p): New funtion.
+ * internal-fn.h (internal_strided_fn_supported_p): Declare.
+ * tree-vect-stmts.cc (vector_vector_composition_type):
+ Add vector_only argument.
+ (vect_use_grouped_gather): New function.
+ (vect_get_store_rhs): Adjust docs of
+ vector_vector_composition_type.
+ (get_load_store_type): Try grouped gather.
+ (vectorizable_store): Use punned vectype.
+ (vectorizable_load): Ditto.
+ * tree-vectorizer.h (struct vect_load_store_data): Add punned
+ vectype.
+
+2025-10-13 Avinash Jayakar <avinashd@linux.ibm.com>
+
+ PR tree-optimization/122213
+ * match.pd: Canonicalize unsigned pow2 div only for trunk, floor and
+ exact div.
+
+2025-10-13 Richard Biener <rguenther@suse.de>
+
+ * tree-vect-patterns.cc (integer_type_for_mask): Add optional
+ output dt argument.
+ (vect_recog_bool_pattern): Make sure to not apply the bitwise
+ binary pattern to an external operand.
+
2025-10-11 Bohan Lei <garthlei@linux.alibaba.com>
PR target/119587
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 1a4c009..75df97b 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20251013
+20251014
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index feffdf1..07ea6aa 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2025-10-13 Iain Sandoe <iain@sandoe.co.uk>
+
+ * c.opt: Enable Wignored-attributes for Objective-C and
+ Objective-C++.
+
2025-10-09 David Faust <david.faust@oracle.com>
* c-attribs.cc (c_common_attribute_table): Add btf_decl_tag and
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index a30c9f1..d5de76c 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -12641,6 +12641,13 @@ riscv_dwarf_poly_indeterminate_value (unsigned int i, unsigned int *factor,
*/
gcc_assert (i == 1);
*factor = BYTES_PER_RISCV_VECTOR.coeffs[1];
+
+ /* The factor will be zero if vector is not enabled. That ultimately
+ causes problems in the dwarf2 emitter as the factor is used for
+ a division, causing a divide by zero. */
+ if (*factor == 0)
+ *factor = 1;
+
*offset = 1;
return RISCV_DWARF_VLENB;
}
@@ -15433,9 +15440,13 @@ synthesize_add (rtx operands[3])
ival -= saturated;
- rtx x = gen_rtx_PLUS (word_mode, operands[1], GEN_INT (saturated));
+ /* The first add may be an FP relative address during reload. FP
+ may be replaced with (sp + C). We don't want that to already
+ be saturated as (sp + C) would then exceed a simm12 field. So
+ emit the smaller offset first and the saturated constant last. */
+ rtx x = gen_rtx_PLUS (word_mode, operands[1], GEN_INT (ival));
emit_insn (gen_rtx_SET (operands[0], x));
- rtx output = gen_rtx_PLUS (word_mode, operands[0], GEN_INT (ival));
+ rtx output = gen_rtx_PLUS (word_mode, operands[0], GEN_INT (saturated));
emit_insn (gen_rtx_SET (operands[0], output));
return true;
}
@@ -15532,14 +15543,18 @@ synthesize_add_extended (rtx operands[3])
ival -= saturated;
+ /* The first add may be an FP relative address during reload. FP
+ may be replaced with (sp + C). We don't want that to already
+ be saturated as (sp + C) would then exceed a simm12 field. So
+ emit the smaller offset first and the saturated constant last. */
rtx temp = gen_reg_rtx (DImode);
- emit_insn (gen_addsi3_extended (temp, operands[1], GEN_INT (saturated)));
+ emit_insn (gen_addsi3_extended (temp, operands[1], GEN_INT (ival)));
temp = gen_lowpart (SImode, temp);
SUBREG_PROMOTED_VAR_P (temp) = 1;
SUBREG_PROMOTED_SET (temp, SRP_SIGNED);
emit_insn (gen_rtx_SET (operands[0], temp));
rtx t = gen_reg_rtx (DImode);
- emit_insn (gen_addsi3_extended (t, operands[0], GEN_INT (ival)));
+ emit_insn (gen_addsi3_extended (t, operands[0], GEN_INT (saturated)));
t = gen_lowpart (SImode, t);
SUBREG_PROMOTED_VAR_P (t) = 1;
SUBREG_PROMOTED_SET (t, SRP_SIGNED);
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index 78a01ef..640ca5f 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -702,6 +702,22 @@
[(set_attr "type" "fadd")
(set_attr "mode" "<UNITMODE>")])
+(define_expand "addptr<mode>3"
+ [(set (match_operand:X 0 "register_operand")
+ (plus:X (match_operand:X 1 "register_operand")
+ (match_operand 2 "const_int_operand")))]
+ ""
+{
+ gcc_assert (CONST_INT_P (operands[2]));
+ bool status = synthesize_add (operands);
+
+ if (!SMALL_OPERAND (INTVAL (operands[2])))
+ {
+ gcc_assert (status);
+ DONE;
+ }
+})
+
(define_insn "*addsi3"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(plus:SI (match_operand:SI 1 "register_operand" " r,r")
@@ -759,46 +775,6 @@
[(set_attr "type" "arith")
(set_attr "mode" "DI")])
-;; Special case of adding a reg and constant if latter is sum of two S12
-;; values (in range -2048 to 2047). Avoid materialized the const and fuse
-;; into the add (with an additional add for 2nd value). Makes a 3 insn
-;; sequence into 2 insn.
-
-(define_insn_and_split "*add<mode>3_const_sum_of_two_s12"
- [(set (match_operand:P 0 "register_operand" "=r,r")
- (plus:P (match_operand:P 1 "register_operand" " r,r")
- (match_operand:P 2 "const_two_s12" " MiG,r")))]
- "!riscv_reg_frame_related (operands[0])"
-{
- /* operand matching MiG constraint is always meant to be split. */
- if (which_alternative == 0)
- return "#";
- else
- return "add %0,%1,%2";
-}
- ""
- [(set (match_dup 0)
- (plus:P (match_dup 1) (match_dup 3)))
- (set (match_dup 0)
- (plus:P (match_dup 0) (match_dup 4)))]
-{
- int val = INTVAL (operands[2]);
- if (SUM_OF_TWO_S12_P (val))
- {
- operands[3] = GEN_INT (2047);
- operands[4] = GEN_INT (val - 2047);
- }
- else if (SUM_OF_TWO_S12_N (val))
- {
- operands[3] = GEN_INT (-2048);
- operands[4] = GEN_INT (val + 2048);
- }
- else
- gcc_unreachable ();
-}
- [(set_attr "type" "arith")
- (set_attr "mode" "<P:MODE>")])
-
(define_expand "addv<mode>4"
[(set (match_operand:GPR 0 "register_operand" "=r,r")
(plus:GPR (match_operand:GPR 1 "register_operand" " r,r")
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index aeec007..4e41b69 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2025-10-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/122228
+ * decl.cc (cp_make_fname_decl): When not using fname_as_decl,
+ attempt to translate name into ordinary literal encoding.
+
+2025-10-13 Jakub Jelinek <jakub@redhat.com>
+
+ * decl.cc (omp_declare_variant_finalize_one): If !nbase_args
+ and TREE_TYPE (decl) has TYPE_NO_NAMED_ARGS_STDARG_P bit set
+ and varg is NULL, temporarily set TYPE_NO_NAMED_ARGS_STDARG_P
+ on TREE_TYPE (variant).
+
2025-10-12 Nathaniel Shead <nathanieloshead@gmail.com>
PR c++/122163
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 0579107..2089e4c 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -5806,6 +5806,23 @@ cp_make_fname_decl (location_t loc, tree id, int type_dep)
name = cxx_printable_name (current_function_decl, 2);
}
+ if (!release_name)
+ {
+ cpp_string cstr = { 0, 0 }, strname;
+ size_t len = strlen (name) + 3; /* Two for '"'s. One for NULL. */
+ char *namep = XNEWVEC (char, len);
+ snprintf (namep, len, "\"%s\"", name);
+ strname.text = (unsigned char *) namep;
+ strname.len = len - 1;
+ if (cpp_interpret_string (parse_in, &strname, 1, &cstr, CPP_STRING))
+ {
+ name = (const char *) cstr.text;
+ release_name = true;
+ }
+
+ XDELETEVEC (namep);
+ }
+
size_t length = strlen (name);
domain = build_index_type (size_int (length));
init = build_string (length + 1, name);
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 914341d..b84ce2f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,11 @@
+2025-10-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/121191
+ * trans-array.cc (has_parameterized_comps): New function which
+ checks if a derived type has parameterized components.
+ ( gfc_deallocate_pdt_comp): Use it to prevent deallocation of
+ PDTs if there are no parameterized components.
+
2025-10-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/95543
diff --git a/gcc/m2/ChangeLog b/gcc/m2/ChangeLog
index 316e0ba..8efab9e 100644
--- a/gcc/m2/ChangeLog
+++ b/gcc/m2/ChangeLog
@@ -1,3 +1,67 @@
+2025-10-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/122241
+ * gm2-compiler/M2Quads.mod (BuildSizeFunction): Improve
+ error message.
+ (BuildTSizeFunction): Improve error message.
+ * gm2-compiler/P3Build.bnf (ProgramModule): New variable
+ namet.
+ Pass namet to P3EndBuildProgModule.
+ (ImplementationModule): New variable namet.
+ Pass namet to P3EndBuildImpModule.
+ (ModuleDeclaration): New variable namet.
+ Pass namet to P3EndBuildInnerModule.
+ (DefinitionModule): New variable namet.
+ Pass namet to P3EndBuildDefModule.
+ * gm2-compiler/P3SymBuild.def (P3EndBuildDefModule): New
+ parameter tokno.
+ (P3EndBuildImpModule): Ditto.
+ (P3EndBuildProgModule): Ditto.
+ (EndBuildInnerModule): Ditto.
+ * gm2-compiler/P3SymBuild.mod (P3EndBuildDefModule): New
+ parameter tokno.
+ Pass tokno to CheckForUnknownInModule.
+ (P3EndBuildImpModule): Ditto.
+ (P3EndBuildProgModule): Ditto.
+ (EndBuildInnerModule): Ditto.
+ * gm2-compiler/PCBuild.bnf (ProgramModule): New variable
+ namet.
+ Pass namet to PCEndBuildProgModule.
+ (ImplementationModule): New variable namet.
+ Pass namet to PCEndBuildImpModule.
+ (ModuleDeclaration): New variable namet.
+ Pass namet to PCEndBuildInnerModule.
+ (DefinitionModule): New variable namet.
+ Pass namet to PCEndBuildDefModule.
+ * gm2-compiler/PCSymBuild.def (PCEndBuildDefModule): New
+ parameter tokno.
+ (PCEndBuildImpModule): Ditto.
+ (PCEndBuildProgModule): Ditto.
+ (PCEndBuildInnerModule): Ditto.
+ * gm2-compiler/PCSymBuild.mod (PCEndBuildDefModule): New
+ parameter tokno.
+ Pass tokno to CheckForUnknownInModule.
+ (PCEndBuildImpModule): Ditto.
+ (PCEndBuildProgModule): Ditto.
+ (PCEndBuildInnerModule): Ditto.
+ * gm2-compiler/PHBuild.bnf (DefinitionModule): New variable
+ namet.
+ Pass namet to PHEndBuildDefModule.
+ (ModuleDeclaration): New variable namet.
+ Pass namet to PHEndBuildProgModule.
+ (ImplementationModule): New variable namet.
+ Pass namet to PHEndBuildImpModule.
+ (ModuleDeclaration): New variable namet.
+ Pass namet to PHEndBuildInnerModule.
+ (DefinitionModule): New variable namet.
+ Pass namet to PHEndBuildDefModule.
+ * gm2-compiler/SymbolTable.def (CheckForUnknownInModule): Add
+ tokno parameter.
+ * gm2-compiler/SymbolTable.mod (CheckForUnknownInModule): Add
+ tokno parameter.
+ Pass tokno to CheckForUnknowns.
+ (CheckForUnknowns): Reimplement.
+
2025-10-11 Gaius Mulley <gaiusmod2@gmail.com>
PR modula2/122241
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index c2be0ba..3bdf8c5 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -10712,7 +10712,7 @@ BEGIN
ELSE
resulttok := functok ;
MetaErrorT1 (resulttok,
- '{%E}SYSTEM procedure {%kSIZE} expects a variable as its parameter, seen {%1Ed}',
+ '{%E}SYSTEM procedure {%kSIZE} expects a variable or type as its parameter, seen {%1Ed}',
OperandT (1)) ;
ReturnVar := MakeConstLit (resulttok, MakeKey('0'), Cardinal)
END ;
@@ -10777,7 +10777,7 @@ BEGIN
GenQuadO (resulttok, SizeOp, ReturnVar, NulSym, GetSType (OperandT (1)), FALSE)
ELSE
MetaErrorT1 (resulttok,
- '{%E}SYSTEM procedure function {%kTSIZE} expects a variable as its first parameter, seen {%1Ed}',
+ '{%E}SYSTEM procedure function {%kTSIZE} expects a variable or type as its first parameter, seen {%1Ed}',
OperandT (1)) ;
ReturnVar := MakeConstLit (resulttok, MakeKey ('0'), Cardinal)
END
diff --git a/gcc/m2/gm2-compiler/P3Build.bnf b/gcc/m2/gm2-compiler/P3Build.bnf
index ab4caae..959b5f6 100644
--- a/gcc/m2/gm2-compiler/P3Build.bnf
+++ b/gcc/m2/gm2-compiler/P3Build.bnf
@@ -655,7 +655,7 @@ FileUnit := % Pus
ImplementationOrProgramModule ) % PopAuto %
=:
-ProgramModule := % VAR modulet, endt: CARDINAL ; %
+ProgramModule := % VAR modulet, endt, namet: CARDINAL ; %
% modulet := GetTokenNo () %
"MODULE" % M2Error.DefaultProgramModule %
% PushAutoOn %
@@ -670,12 +670,13 @@ ProgramModule := % VAR
{ Import }
Block % PushAutoOn %
% endt := GetTokenNo () -1 %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) %
- % P3EndBuildProgModule %
+ % P3EndBuildProgModule (namet) %
"." % PopAuto ; PopAuto %
=:
-ImplementationModule := % VAR modulet, endt: CARDINAL ; %
+ImplementationModule := % VAR modulet, endt, namet: CARDINAL ; %
% modulet := GetTokenNo () %
"IMPLEMENTATION" % M2Error.DefaultImplementationModule %
"MODULE" % PushAutoOn %
@@ -689,8 +690,9 @@ ImplementationModule := % VAR
{ Import }
Block % PushAutoOn %
% endt := GetTokenNo () -1 %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) %
- % P3EndBuildImpModule %
+ % P3EndBuildImpModule (namet) %
"." % PopAuto ; PopAuto ; PopAuto %
=:
@@ -1503,7 +1505,7 @@ DefOptArg := "[" Ident ":" FormalType "=" ConstExpression % Bui
FormalType := { "ARRAY" "OF" } QualidentCheck =:
-ModuleDeclaration := % VAR modulet: CARDINAL ; %
+ModuleDeclaration := % VAR modulet, namet: CARDINAL ; %
% modulet := GetTokenNo () %
"MODULE" % M2Error.DefaultInnerModule %
% PushAutoOn %
@@ -1513,7 +1515,8 @@ ModuleDeclaration := % VAR
[ Priority ] ";"
{ Import } [ Export ]
Block % PushAutoOn %
- Ident % EndBuildInnerModule %
+ % namet := GetTokenNo () %
+ Ident % EndBuildInnerModule (namet) %
% PopAuto ; PopAuto ; PopAuto %
=:
@@ -1540,7 +1543,7 @@ WithoutFromImport := % Pus
Import := FromImport | WithoutFromImport =:
-DefinitionModule := % VAR deft, endt: CARDINAL ; %
+DefinitionModule := % VAR deft, endt, namet: CARDINAL ; %
% deft := GetTokenNo () %
"DEFINITION" % M2Error.DefaultDefinitionModule %
"MODULE" % PushAutoOn %
@@ -1553,8 +1556,9 @@ DefinitionModule := % VAR
]
{ Definition } % endt := GetTokenNo () %
"END" % PushAutoOn %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) ;
- P3EndBuildDefModule %
+ P3EndBuildDefModule (namet) %
"." % PopAuto ; PopAuto ; PopAuto %
=:
diff --git a/gcc/m2/gm2-compiler/P3SymBuild.def b/gcc/m2/gm2-compiler/P3SymBuild.def
index 824efd0..1bbf7ab 100644
--- a/gcc/m2/gm2-compiler/P3SymBuild.def
+++ b/gcc/m2/gm2-compiler/P3SymBuild.def
@@ -64,7 +64,7 @@ PROCEDURE P3StartBuildDefModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildDefModule ;
+PROCEDURE P3EndBuildDefModule (tokno: CARDINAL) ;
(*
@@ -101,7 +101,7 @@ PROCEDURE P3StartBuildImpModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildImpModule ;
+PROCEDURE P3EndBuildImpModule (tokno: CARDINAL) ;
(*
@@ -138,7 +138,7 @@ PROCEDURE P3StartBuildProgModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildProgModule ;
+PROCEDURE P3EndBuildProgModule (tokno: CARDINAL) ;
(*
@@ -182,7 +182,7 @@ PROCEDURE StartBuildInnerModule ;
|------------| |-----------|
*)
-PROCEDURE EndBuildInnerModule ;
+PROCEDURE EndBuildInnerModule (tokno: CARDINAL) ;
(*
diff --git a/gcc/m2/gm2-compiler/P3SymBuild.mod b/gcc/m2/gm2-compiler/P3SymBuild.mod
index b0bb160..8d8e12f 100644
--- a/gcc/m2/gm2-compiler/P3SymBuild.mod
+++ b/gcc/m2/gm2-compiler/P3SymBuild.mod
@@ -117,13 +117,13 @@ END P3StartBuildDefModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildDefModule ;
+PROCEDURE P3EndBuildDefModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : CARDINAL ;
BEGIN
Assert(CompilingDefinitionModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
M2StackSpell.Pop ;
PopT(NameEnd) ;
@@ -187,13 +187,13 @@ END P3StartBuildImpModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildImpModule ;
+PROCEDURE P3EndBuildImpModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
Assert(CompilingImplementationModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
M2StackSpell.Pop ;
PopT(NameEnd) ;
@@ -262,13 +262,13 @@ END P3StartBuildProgModule ;
|------------| |-----------|
*)
-PROCEDURE P3EndBuildProgModule ;
+PROCEDURE P3EndBuildProgModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
Assert(CompilingProgramModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
@@ -334,12 +334,12 @@ END StartBuildInnerModule ;
|------------| |-----------|
*)
-PROCEDURE EndBuildInnerModule ;
+PROCEDURE EndBuildInnerModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
diff --git a/gcc/m2/gm2-compiler/PCBuild.bnf b/gcc/m2/gm2-compiler/PCBuild.bnf
index ddbe2f1..d8ab7a6 100644
--- a/gcc/m2/gm2-compiler/PCBuild.bnf
+++ b/gcc/m2/gm2-compiler/PCBuild.bnf
@@ -598,7 +598,8 @@ FileUnit := % Pus
ImplementationOrProgramModule ) % PopAuto %
=:
-ProgramModule := "MODULE" % M2Error.DefaultProgramModule %
+ProgramModule := "MODULE" % VAR namet: CARDINAL ; %
+ % M2Error.DefaultProgramModule %
% PushAutoOn %
Ident % PCStartBuildProgModule %
% PushAutoOff %
@@ -608,11 +609,13 @@ ProgramModule := "MODULE" % M2E
{ Import % PCBuildImportOuterModule %
}
Block % PushAutoOn %
- Ident % PCEndBuildProgModule %
+ % namet := GetTokenNo () %
+ Ident % PCEndBuildProgModule (namet) %
"." % PopAuto ; PopAuto %
=:
-ImplementationModule := "IMPLEMENTATION" % M2Error.DefaultImplementationModule %
+ImplementationModule := "IMPLEMENTATION" % VAR namet: CARDINAL ; %
+ % M2Error.DefaultImplementationModule %
"MODULE" % PushAutoOn %
Ident % PCStartBuildImpModule %
% PushAutoOff %
@@ -621,8 +624,8 @@ ImplementationModule := "IMPLEMENTATION" % M2E
{ Import % PCBuildImportOuterModule %
}
Block % PushAutoOn %
-
- Ident % PCEndBuildImpModule %
+ % namet := GetTokenNo () %
+ Ident % PCEndBuildImpModule (namet) %
"." % PopAuto ; PopAuto ; PopAuto %
=:
@@ -1271,7 +1274,8 @@ DefOptArg := "[" Ident ":" FormalType "=" ConstExpression "]" =:
FormalType := { "ARRAY" "OF" } Qualident =:
-ModuleDeclaration := "MODULE" % M2Error.DefaultInnerModule %
+ModuleDeclaration := "MODULE" % VAR namet: CARDINAL ; %
+ % M2Error.DefaultInnerModule %
% PushAutoOn %
Ident % PCStartBuildInnerModule %
% PushAutoOff %
@@ -1280,7 +1284,8 @@ ModuleDeclaration := "MODULE" % M2E
} [ Export
]
Block % PushAutoOn %
- Ident % PCEndBuildInnerModule %
+ % namet := GetTokenNo () %
+ Ident % PCEndBuildInnerModule (namet) %
% PopAuto ; PopAuto ; PopAuto %
=:
@@ -1299,7 +1304,8 @@ Import := % Pus
IdentList ";" ) % PopAuto %
=:
-DefinitionModule := "DEFINITION" % M2Error.DefaultDefinitionModule %
+DefinitionModule := "DEFINITION" % VAR namet: CARDINAL ; %
+ % M2Error.DefaultDefinitionModule %
"MODULE" % PushAutoOn %
[ "FOR" string ]
Ident % PCStartBuildDefModule ;
@@ -1310,7 +1316,8 @@ DefinitionModule := "DEFINITION" % M2E
]
{ Definition }
"END" % PushAutoOn %
- Ident % PCEndBuildDefModule %
+ % namet := GetTokenNo () %
+ Ident % PCEndBuildDefModule (namet) %
"." % PopAuto ; PopAuto ; PopAuto %
=:
diff --git a/gcc/m2/gm2-compiler/PCSymBuild.def b/gcc/m2/gm2-compiler/PCSymBuild.def
index a25ea87..1a1acf4 100644
--- a/gcc/m2/gm2-compiler/PCSymBuild.def
+++ b/gcc/m2/gm2-compiler/PCSymBuild.def
@@ -71,7 +71,7 @@ PROCEDURE PCStartBuildDefModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildDefModule ;
+PROCEDURE PCEndBuildDefModule (tokno: CARDINAL) ;
(*
@@ -108,7 +108,7 @@ PROCEDURE PCStartBuildImpModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildImpModule ;
+PROCEDURE PCEndBuildImpModule (tokno: CARDINAL) ;
(*
@@ -145,7 +145,7 @@ PROCEDURE PCStartBuildProgModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildProgModule ;
+PROCEDURE PCEndBuildProgModule (tokno: CARDINAL) ;
(*
@@ -182,7 +182,7 @@ PROCEDURE PCStartBuildInnerModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildInnerModule ;
+PROCEDURE PCEndBuildInnerModule (tokno: CARDINAL) ;
(*
diff --git a/gcc/m2/gm2-compiler/PCSymBuild.mod b/gcc/m2/gm2-compiler/PCSymBuild.mod
index 4db2730..5e44997 100644
--- a/gcc/m2/gm2-compiler/PCSymBuild.mod
+++ b/gcc/m2/gm2-compiler/PCSymBuild.mod
@@ -257,13 +257,13 @@ END PCStartBuildDefModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildDefModule ;
+PROCEDURE PCEndBuildDefModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : CARDINAL ;
BEGIN
Assert(CompilingDefinitionModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
@@ -325,13 +325,13 @@ END PCStartBuildImpModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildImpModule ;
+PROCEDURE PCEndBuildImpModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
Assert(CompilingImplementationModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
@@ -398,13 +398,13 @@ END PCStartBuildProgModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildProgModule ;
+PROCEDURE PCEndBuildProgModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
Assert(CompilingProgramModule()) ;
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
@@ -468,12 +468,12 @@ END PCStartBuildInnerModule ;
|------------| |-----------|
*)
-PROCEDURE PCEndBuildInnerModule ;
+PROCEDURE PCEndBuildInnerModule (tokno: CARDINAL) ;
VAR
NameStart,
NameEnd : Name ;
BEGIN
- CheckForUnknownInModule ;
+ CheckForUnknownInModule (tokno) ;
EndScope ;
PopT(NameEnd) ;
PopT(NameStart) ;
diff --git a/gcc/m2/gm2-compiler/PHBuild.bnf b/gcc/m2/gm2-compiler/PHBuild.bnf
index 8153870..abb5f37 100644
--- a/gcc/m2/gm2-compiler/PHBuild.bnf
+++ b/gcc/m2/gm2-compiler/PHBuild.bnf
@@ -551,7 +551,7 @@ FileUnit := % Pus
ImplementationOrProgramModule ) % PopAuto %
=:
-ProgramModule := % VAR begint, endt: CARDINAL ; %
+ProgramModule := % VAR begint, endt, namet: CARDINAL ; %
% begint := GetTokenNo () %
"MODULE" % M2Error.DefaultProgramModule %
% PushAutoOn %
@@ -566,14 +566,15 @@ ProgramModule := % VAR
% StartBuildInit (begint) %
Block % PushAutoOn %
% endt := GetTokenNo () -1 %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) %
- % P3EndBuildProgModule %
+ % P3EndBuildProgModule (namet) %
"." % PopAuto ;
EndBuildInit (endt) ;
PopAuto %
=:
-ImplementationModule := % VAR begint, endt: CARDINAL ; %
+ImplementationModule := % VAR begint, endt, namet: CARDINAL ; %
% begint := GetTokenNo () %
"IMPLEMENTATION" % M2Error.DefaultImplementationModule %
"MODULE" % PushAutoOn %
@@ -588,8 +589,9 @@ ImplementationModule := % VAR
% StartBuildInit (begint) %
Block % PushAutoOn %
% endt := GetTokenNo () -1 %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) %
- % P3EndBuildImpModule %
+ % P3EndBuildImpModule (namet) %
"." % PopAuto ;
EndBuildInit (endt) ;
PopAuto ;
@@ -1229,7 +1231,7 @@ DefOptArg := "[" Ident ":" FormalType "=" SilentConstExpression "]" =:
FormalType := { "ARRAY" "OF" } Qualident =:
-ModuleDeclaration := % VAR begint: CARDINAL ; %
+ModuleDeclaration := % VAR begint, namet: CARDINAL ; %
% begint := GetTokenNo () %
"MODULE" % M2Error.DefaultInnerModule %
% PushAutoOn %
@@ -1242,7 +1244,8 @@ ModuleDeclaration := % VAR
} [ Export
]
Block % PushAutoOn %
- Ident % EndBuildInnerModule %
+ % namet := GetTokenNo () %
+ Ident % EndBuildInnerModule (namet) %
% PopAuto ; PopAuto ; PopAuto %
=:
@@ -1258,7 +1261,7 @@ Import := "FROM" Ident "IMPORT" IdentList ";" |
"IMPORT"
IdentList ";" =:
-DefinitionModule := % VAR begint, endt: CARDINAL ; %
+DefinitionModule := % VAR begint, endt, namet: CARDINAL ; %
% begint := GetTokenNo () %
"DEFINITION" % M2Error.DefaultDefinitionModule %
"MODULE" % PushAutoOn %
@@ -1272,8 +1275,9 @@ DefinitionModule := % VAR
]
{ Definition } % endt := GetTokenNo () %
"END" % PushAutoOn %
+ % namet := GetTokenNo () %
Ident % EndBuildFile (endt) ;
- P3EndBuildDefModule %
+ P3EndBuildDefModule (namet) %
"." % PopAuto ; PopAuto ; PopAuto %
=:
diff --git a/gcc/m2/gm2-compiler/SymbolTable.def b/gcc/m2/gm2-compiler/SymbolTable.def
index 12a3b3a..09a5590 100644
--- a/gcc/m2/gm2-compiler/SymbolTable.def
+++ b/gcc/m2/gm2-compiler/SymbolTable.def
@@ -2124,7 +2124,7 @@ PROCEDURE CheckForUndeclaredExports (ModSym: CARDINAL) ;
an error message is displayed.
*)
-PROCEDURE CheckForUnknownInModule ;
+PROCEDURE CheckForUnknownInModule (tokno: CARDINAL) ;
(*
diff --git a/gcc/m2/gm2-compiler/SymbolTable.mod b/gcc/m2/gm2-compiler/SymbolTable.mod
index e733cfd..023bd49 100644
--- a/gcc/m2/gm2-compiler/SymbolTable.mod
+++ b/gcc/m2/gm2-compiler/SymbolTable.mod
@@ -9585,29 +9585,29 @@ END ForeachParamSymDo ;
an error message is displayed.
*)
-PROCEDURE CheckForUnknownInModule ;
+PROCEDURE CheckForUnknownInModule (tokno: CARDINAL) ;
VAR
pSym: PtrToSymbol ;
BEGIN
- pSym := GetPsym(GetCurrentModuleScope()) ;
+ pSym := GetPsym (GetCurrentModuleScope ()) ;
WITH pSym^ DO
CASE SymbolType OF
DefImpSym: WITH DefImp DO
- CheckForUnknowns (name, ExportQualifiedTree,
+ CheckForUnknowns (tokno, name, ExportQualifiedTree,
'EXPORT QUALIFIED') ;
- CheckForUnknowns (name, ExportUnQualifiedTree,
+ CheckForUnknowns (tokno, name, ExportUnQualifiedTree,
'EXPORT UNQUALIFIED') ;
- CheckForSymbols (ExportRequest,
- 'requested by another modules import (symbols have not been exported by the appropriate definition module)') ;
- CheckForUnknowns (name, Unresolved, 'unresolved') ;
- CheckForUnknowns (name, LocalSymbols, 'locally used')
+ CheckForSymbols (ExportRequest,
+ 'requested by another modules import (symbols have not been exported by the appropriate definition module)') ;
+ CheckForUnknowns (tokno, name, Unresolved, 'unresolved') ;
+ CheckForUnknowns (tokno, name, LocalSymbols, 'locally used')
END |
ModuleSym: WITH Module DO
- CheckForUnknowns (name, Unresolved, 'unresolved') ;
- CheckForUnknowns (name, ExportUndeclared, 'exported but undeclared') ;
- CheckForUnknowns (name, ExportTree, 'exported but undeclared') ;
- CheckForUnknowns (name, LocalSymbols, 'locally used')
+ CheckForUnknowns (tokno, name, Unresolved, 'unresolved') ;
+ CheckForUnknowns (tokno, name, ExportUndeclared, 'exported but undeclared') ;
+ CheckForUnknowns (tokno, name, ExportTree, 'exported but undeclared') ;
+ CheckForUnknowns (tokno, name, LocalSymbols, 'locally used')
END
ELSE
@@ -9626,7 +9626,7 @@ BEGIN
IF IsUnreportedUnknown (sym)
THEN
IncludeElementIntoSet (ReportedUnknowns, sym) ;
- MetaErrorStringT1 (GetFirstUsed (sym), InitString ("unknown symbol {%1EUad}"), sym)
+ MetaErrorStringT1 (GetFirstUsed (sym), InitString ("unknown symbol {%1EUad} {%1&s}"), sym)
END
END UnknownSymbolError ;
@@ -9705,22 +9705,24 @@ END Listify ;
together with an error message.
*)
-PROCEDURE CheckForUnknowns (name: Name; Tree: SymbolTree;
+PROCEDURE CheckForUnknowns (tokno: CARDINAL; name: Name; Tree: SymbolTree;
a: ARRAY OF CHAR) ;
VAR
s: String ;
BEGIN
- IF DoesTreeContainAny(Tree, IsUnreportedUnknown)
- THEN
- CurrentError := NewError(GetTokenNo()) ;
- s := InitString("{%E} the following unknown symbols in module %<") ;
- s := ConCat(s, Mark(InitStringCharStar(KeyToCharStar(name)))) ;
- s := ConCat(s, Mark(InitString('%> were '))) ;
- s := ConCat(s, Mark(InitString(a))) ;
- s := ConCat (s, Mark (InitString (': '))) ;
- s := ConCat (s, Mark (Listify (Tree, IsUnreportedUnknown))) ;
- MetaErrorStringT0(GetTokenNo(), s) ;
- ForeachNodeDo(Tree, UnknownSymbolError)
+ IF DoesTreeContainAny (Tree, IsUnreportedUnknown)
+ THEN
+ ForeachNodeDo (Tree, UnknownSymbolError) ;
+ IF NoOfNodes (Tree, IsUnreportedUnknown) > 0
+ THEN
+ s := InitString ("{%E} the following unknown symbols in module %<") ;
+ s := ConCat (s, Mark (InitStringCharStar (KeyToCharStar (name)))) ;
+ s := ConCat (s, Mark (InitString ('%> were '))) ;
+ s := ConCat (s, Mark (InitString (a))) ;
+ s := ConCat (s, Mark (InitString (': '))) ;
+ s := ConCat (s, Mark (Listify (Tree, IsUnreportedUnknown))) ;
+ MetaErrorStringT0 (tokno, s)
+ END
END
END CheckForUnknowns ;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd5ccac..7b857ec 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,49 @@
+2025-10-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/cpp/cpp.exp: Process .i files.
+ * gcc.dg/cpp/pr36674.i: Pass -Wno-implicit-int.
+ * gcc.dg/cpp/escape-3.i: New test.
+
+2025-10-13 Shreya Munnangi <smunnangi1@ventanamicro.com>
+
+ PR target/120811
+ * gcc.target/riscv/add-synthesis-1.c: Adjust const to fit in range.
+ * gcc.target/riscv/pr120811.c: Add new test case.
+ * gcc.target/riscv/sum-of-two-s12-const-1.c: Adjust const to fit in range.
+
+2025-10-13 Jeff Law <jlaw@ventanamicro.com>
+
+ PR target/120674
+ * gcc.target/riscv/pr120674.c: New test.
+
+2025-10-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/122228
+ * g++.dg/cpp1y/func_constexpr3.C: New test.
+
+2025-10-13 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/122241
+ * gm2/iso/fail/badconst.mod: New test.
+ * gm2/iso/fail/badtype.mod: New test.
+ * gm2/iso/fail/badvar.mod: New test.
+
+2025-10-13 Alex Coplan <alex.coplan@arm.com>
+
+ PR tree-optimization/121772
+ * gcc.target/aarch64/torture/pr121772.c: Add -fchecking to
+ dg-options.
+
+2025-10-13 Robin Dapp <rdapp@ventanamicro.com>
+
+ PR target/118019
+ * gcc.target/riscv/rvv/autovec/pr118019-2.c: New test.
+
+2025-10-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/121191
+ * gfortran.dg/pdt_59.f03: New test.
+
2025-10-12 Nathaniel Shead <nathanieloshead@gmail.com>
PR c++/122163
diff --git a/gcc/testsuite/g++.dg/cpp1y/func_constexpr3.C b/gcc/testsuite/g++.dg/cpp1y/func_constexpr3.C
new file mode 100644
index 0000000..f2963f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/func_constexpr3.C
@@ -0,0 +1,6 @@
+// PR c++/122228
+// { dg-do compile { target c++11 } }
+// { dg-require-iconv "IBM1047" }
+// { dg-options "-fexec-charset=IBM1047 -std=c++11" }
+
+#include "func_constexpr.C"
diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp
index 7a359c0..754ffeb 100644
--- a/gcc/testsuite/gcc.dg/cpp/cpp.exp
+++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
@@ -36,11 +36,11 @@ if ![info exists DEFAULT_CFLAGS] then {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,S} ]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,S,i} ]] \
"" $DEFAULT_CFLAGS
# C/C++ common tests.
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cpp/*.{c,S} ]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cpp/*.{c,S,i} ]] \
" -Wc++-compat " ""
diff --git a/gcc/testsuite/gcc.dg/cpp/escape-3.i b/gcc/testsuite/gcc.dg/cpp/escape-3.i
new file mode 100644
index 0000000..6eb7dc4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/escape-3.i
@@ -0,0 +1,16 @@
+# 0 "escape-3.c"
+# 0 "/some\\directory//"
+# 0 "<built-in>"
+# 0 "<command-line>"
+# 1 "escape-3.c"
+
+/* { dg-do compile } */
+/* { dg-options "-g1" } */
+
+int foo (int a, int b)
+{
+ return a + b;
+}
+
+/* Test for "/some\\directory" instead of "/some\\\\directory" */
+/* { dg-final { scan-assembler { "/some\\\\directory" } } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr36674.i b/gcc/testsuite/gcc.dg/cpp/pr36674.i
index 9362d5a..f436287 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr36674.i
+++ b/gcc/testsuite/gcc.dg/cpp/pr36674.i
@@ -1,6 +1,6 @@
/* PR cpp/36674 #include location is offset by one row in errors from preprocessed files */
/* { dg-do compile } */
-/* { dg-options "-fshow-column" } */
+/* { dg-options "-fshow-column -Wno-implicit-int" } */
# 1 "gcc/testsuite/gcc.dg/pr36674.c"
# 1 "<built-in>"
# 1 "<command-line>"
diff --git a/gcc/testsuite/gcc.target/riscv/add-synthesis-1.c b/gcc/testsuite/gcc.target/riscv/add-synthesis-1.c
index 247096c..982b2fa 100644
--- a/gcc/testsuite/gcc.target/riscv/add-synthesis-1.c
+++ b/gcc/testsuite/gcc.target/riscv/add-synthesis-1.c
@@ -25,7 +25,7 @@ T (4100)
T (8200)
TM (2049)
-TM (4096)
+TM (4094)
TM (4100)
TM (8200)
diff --git a/gcc/testsuite/gcc.target/riscv/pr120674.c b/gcc/testsuite/gcc.target/riscv/pr120674.c
new file mode 100644
index 0000000..ec8835f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr120674.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-g -w -march=rv32gcv -mabi=ilp32" { target rv32 } } */
+/* { dg-additional-options "-g -w -march=rv64gcv -mabi=lp64d" { target rv64 } } */
+
+#pragma riscv intrinsic "vector"
+void GB_AxB_saxpy5_unrolled_rvv() { vfloat64m8_t vc; }
diff --git a/gcc/testsuite/gcc.target/riscv/pr120811.c b/gcc/testsuite/gcc.target/riscv/pr120811.c
index c28e5ec..b8a7347d 100644
--- a/gcc/testsuite/gcc.target/riscv/pr120811.c
+++ b/gcc/testsuite/gcc.target/riscv/pr120811.c
@@ -38,5 +38,4 @@ void q() {
}
/* { dg-final { scan-rtl-dump-not "const_sum_of_two_s12" "reload" } } */
/* { dg-final { scan-rtl-dump-not "const_sum_of_two_s12" "late_combine2" } } */
-/* { dg-final { scan-assembler "addi.*sp,2047\n\tl\[dw\]\t.*,1\(.*\).*" } } */
-
+/* { dg-final { scan-assembler "addi.*\[ats\]\[0-9\]*,sp,\[0-9\]*\n\tld\t.*,2047\(.*\).*" } } */
diff --git a/gcc/testsuite/gcc.target/riscv/sum-of-two-s12-const-1.c b/gcc/testsuite/gcc.target/riscv/sum-of-two-s12-const-1.c
index 4d6d135..ac17ec2 100644
--- a/gcc/testsuite/gcc.target/riscv/sum-of-two-s12-const-1.c
+++ b/gcc/testsuite/gcc.target/riscv/sum-of-two-s12-const-1.c
@@ -26,7 +26,7 @@ plus3(unsigned long i)
long
minus1(unsigned long i)
{
- return i - 4096;
+ return i - 4094;
}
long
diff --git a/gcc/testsuite/gm2/iso/fail/badconst.mod b/gcc/testsuite/gm2/iso/fail/badconst.mod
new file mode 100644
index 0000000..0e58377
--- /dev/null
+++ b/gcc/testsuite/gm2/iso/fail/badconst.mod
@@ -0,0 +1,9 @@
+MODULE badconst ;
+
+CONST
+ foo = 1 ;
+BEGIN
+ IF Foo = 1
+ THEN
+ END
+END badconst.
diff --git a/gcc/testsuite/gm2/iso/fail/badtype.mod b/gcc/testsuite/gm2/iso/fail/badtype.mod
new file mode 100644
index 0000000..9678339
--- /dev/null
+++ b/gcc/testsuite/gm2/iso/fail/badtype.mod
@@ -0,0 +1,11 @@
+MODULE badtype ;
+
+FROM SYSTEM IMPORT TSIZE ;
+
+TYPE
+ foo = CARDINAL ;
+BEGIN
+ IF TSIZE (Foo) = 1
+ THEN
+ END
+END badtype.
diff --git a/gcc/testsuite/gm2/iso/fail/badvar.mod b/gcc/testsuite/gm2/iso/fail/badvar.mod
new file mode 100644
index 0000000..7a41706
--- /dev/null
+++ b/gcc/testsuite/gm2/iso/fail/badvar.mod
@@ -0,0 +1,7 @@
+MODULE badvar ;
+
+VAR
+ foo: CARDINAL ;
+BEGIN
+ Foo := 1
+END badvar.
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 43d3f39..253812e 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2025-10-13 Pierre Marie de Rodat <derodat@adacore.com>
+
+ * init.cc (read_original_directory): Attempt to decode escape
+ sequences with cpp_interpret_string_notranslate.
+
2025-10-08 Jakub Jelinek <jakub@redhat.com>
* makeucnid.cc (write_copyright): Adjust copyright year.
diff --git a/libcpp/init.cc b/libcpp/init.cc
index eb495e2..567d5e7 100644
--- a/libcpp/init.cc
+++ b/libcpp/init.cc
@@ -893,11 +893,34 @@ read_original_directory (cpp_reader *pfile)
if (pfile->cb.dir_change)
{
- /* Smash the string directly, it's dead at this point */
- char *smashy = (char *)text;
- smashy[len - 3] = 0;
+ cpp_string s = { 0, 0 };
+ const char *dir_slashslash;
+ unsigned int dir_slashslash_len;
+
+ /* If we fail to decode escape sequences in the string literal, fall
+ back onto the literal itself, manually removing the opening and
+ closing quotes ("). */
+ if (cpp_interpret_string_notranslate (pfile, &string->val.str, 1, &s,
+ CPP_STRING))
+ {
+ /* At this point, the trailing NUL byte in S is included in its
+ length, so take it out. */
+ dir_slashslash = (const char *) s.text;
+ dir_slashslash_len = s.len - 1;
+ }
+ else
+ {
+ dir_slashslash = (const char *) string->val.str.text + 1;
+ dir_slashslash_len = string->val.str.len - 2;
+ }
+
+ /* Strip the trailing double slash. */
+ const unsigned dir_len = dir_slashslash_len - 2;
+ char *dir = (char *) alloca (dir_len + 1);
+ memcpy (dir, dir_slashslash, dir_len);
+ dir[dir_len] = '\0';
- pfile->cb.dir_change (pfile, smashy + 1);
+ pfile->cb.dir_change (pfile, dir);
}
/* We should be at EOL. */
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index eb6493e..c1221fb 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,25 @@
+2025-10-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/stl_iterator_base_funcs.h (advance): Fix comment.
+
+2025-10-13 Yuao Ma <c8ef@outlook.com>
+
+ * include/bits/atomic_base.h: Implement address().
+ * include/bits/version.def: Bump version number.
+ * include/bits/version.h: Regenerate.
+ * testsuite/29_atomics/atomic_ref/address.cc: New test.
+
+2025-10-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/unicode.h (_Utf_view::_M_read_reverse_utf16):
+ Fix check for high surrogate preceding low surrogate.
+ * testsuite/ext/unicode/view.cc: Check unpaired low surrogates.
+
+2025-10-13 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/unicode.h (__is_single_code_unit): Fix check for
+ 7-bit ASCII characters.
+
2025-10-11 Gerald Pfeifer <gerald@pfeifer.com>
* doc/xml/manual/build_hacking.xml: Update Autoconf manual link.
diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
index f78e535..fb7b6b0 100644
--- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
@@ -265,7 +265,7 @@ namespace __detail
// A type which satisfies the C++20 bidirectional_iterator concept might
// have input_iterator_tag as its iterator_category type, which would
// mean we select the __advance overload which cannot move backwards.
- // A C++20 random_access_iterator we might select the O(n) __advance
+ // For a C++20 random_access_iterator we might select the O(n) __advance
// if it doesn't meet the Cpp17RandomAccessIterator requirements.
// So for C++20 iterator types we can just choose to do the right thing.
if constexpr (__detail::__promotable_iterator<_InputIterator>