diff --git a/.gitignore b/.gitignore
index d7b450a..21dcf61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,4 @@
/gcc-12.0.0-20220108.tar.xz
/gcc-12.0.0-20220112.tar.xz
/gcc-12.0.0-20220115.tar.xz
+/gcc-12.0.1-20220118.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 598eb4d..29ddb2f 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,6 +1,6 @@
-%global DATE 20220115
-%global gitrev d8c9e50646a688fa39fd228289164868692b3474
-%global gcc_version 12.0.0
+%global DATE 20220118
+%global gitrev 880787aef7a985a80f88a14f830fb554a33b1a87
+%global gcc_version 12.0.1
%global gcc_major 12
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.5.1%{?dist}
+Release: %{gcc_release}.1%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -269,6 +269,7 @@ Patch8: gcc12-no-add-needed.patch
Patch9: gcc12-Wno-format-security.patch
Patch10: gcc12-rh1574936.patch
Patch11: gcc12-d-shared-libphobos.patch
+Patch12: gcc12-pr104025.patch
Patch100: gcc12-fortran-fdec-duplicates.patch
Patch101: gcc12-fortran-flogical-as-integer.patch
@@ -790,6 +791,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .pr104025~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -993,9 +995,6 @@ CONFIGURE_OPTS="\
%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64le ppc64p7 s390 s390x alpha
--with-long-double-128 \
%endif
-%ifarch ppc64le
- --with-long-double-format=ieee \
-%endif
%ifarch sparc
--disable-linux-futex \
%endif
@@ -3149,8 +3148,13 @@ end
%endif
%changelog
-* Sat Jan 15 2022 Jakub Jelinek 12.0.0-0.5.1
-- default to -mabi=ieeelongdouble on ppc64le
+* Tue Jan 18 2022 Jakub Jelinek 12.0.1-0.1
+- update from trunk
+ - PRs c++/104031, c/63272, fortran/83079, fortran/87711, fortran/97896,
+ libstdc++/103650, libstdc++/104080, middle-end/101292, target/103124,
+ target/103973, target/104005, testsuite/104035, testsuite/104037,
+ tree-optimization/80532, tree-optimization/101941,
+ tree-optimization/104064
* Sat Jan 15 2022 Jakub Jelinek 12.0.0-0.5
- update from trunk
diff --git a/gcc12-fortran-fdec-add-missing-indexes.patch b/gcc12-fortran-fdec-add-missing-indexes.patch
index d707b94..529868f 100644
--- a/gcc12-fortran-fdec-add-missing-indexes.patch
+++ b/gcc12-fortran-fdec-add-missing-indexes.patch
@@ -6,8 +6,8 @@ Subject: [PATCH 10/10] Fill in missing array dimensions using the lower bound
Use -fdec-add-missing-indexes to enable feature. Also enabled by fdec.
---
gcc/fortran/lang.opt | 8 ++++++++
- gcc/fortran/options.c | 1 +
- gcc/fortran/resolve.c | 24 ++++++++++++++++++++++++
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/resolve.cc | 24 ++++++++++++++++++++++++
gcc/testsuite/gfortran.dg/array_6.f90 | 23 +++++++++++++++++++++++
gcc/testsuite/gfortran.dg/array_7.f90 | 23 +++++++++++++++++++++++
gcc/testsuite/gfortran.dg/array_8.f90 | 23 +++++++++++++++++++++++
@@ -42,10 +42,10 @@ index 019c798cf09..f27de88ea3f 100644
fdec-blank-format-item
Fortran Var(flag_dec_blank_format_item)
Enable the use of blank format items in format strings.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index 050f56fdc25..c3b2822685d 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -84,6 +84,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_non_logical_if, value, value);
SET_BITFLAG (flag_dec_promotion, value, value);
@@ -54,10 +54,10 @@ index 050f56fdc25..c3b2822685d 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index fe7d0cc5944..0efeedab46e 100644
---- a/gcc/fortran/resolve.c
-+++ b/gcc/fortran/resolve.c
+--- a/gcc/fortran/resolve.cc
++++ b/gcc/fortran/resolve.cc
@@ -4806,6 +4806,30 @@ compare_spec_to_ref (gfc_array_ref *ar)
if (ar->type == AR_FULL)
return true;
diff --git a/gcc12-fortran-fdec-duplicates.patch b/gcc12-fortran-fdec-duplicates.patch
index b5d1104..5298baa 100644
--- a/gcc12-fortran-fdec-duplicates.patch
+++ b/gcc12-fortran-fdec-duplicates.patch
@@ -9,8 +9,8 @@ Some fixes by Jim MacArthur
Addition of -fdec-duplicates by Mark Eggleston
---
gcc/fortran/lang.opt | 4 ++++
- gcc/fortran/options.c | 1 +
- gcc/fortran/symbol.c | 21 +++++++++++++++++--
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/symbol.cc | 21 +++++++++++++++++--
.../gfortran.dg/duplicate_type_4.f90 | 13 ++++++++++++
.../gfortran.dg/duplicate_type_5.f90 | 13 ++++++++++++
.../gfortran.dg/duplicate_type_6.f90 | 13 ++++++++++++
@@ -40,10 +40,10 @@ index 2b1977c523b..52bd522051e 100644
fdec-include
Fortran Var(flag_dec_include)
Enable legacy parsing of INCLUDE as statement.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index 3a0b98bf1ec..f19ba87f8a0 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -77,6 +77,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_format_defaults, value, value);
SET_BITFLAG (flag_dec_blank_format_item, value, value);
@@ -52,10 +52,10 @@ index 3a0b98bf1ec..f19ba87f8a0 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
+diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
index 3b988d1be22..9843175cc2a 100644
---- a/gcc/fortran/symbol.c
-+++ b/gcc/fortran/symbol.c
+--- a/gcc/fortran/symbol.cc
++++ b/gcc/fortran/symbol.cc
@@ -1995,6 +1995,8 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
if (sym->attr.result && type == BT_UNKNOWN && sym->ns->proc_name)
type = sym->ns->proc_name->ts.type;
diff --git a/gcc12-fortran-fdec-ichar.patch b/gcc12-fortran-fdec-ichar.patch
index e7b0522..900b054 100644
--- a/gcc12-fortran-fdec-ichar.patch
+++ b/gcc12-fortran-fdec-ichar.patch
@@ -5,16 +5,16 @@ Subject: [PATCH 03/10] Allow more than one character as argument to ICHAR
Use -fdec to enable.
---
- gcc/fortran/check.c | 2 +-
- gcc/fortran/simplify.c | 4 ++--
+ gcc/fortran/check.cc | 2 +-
+ gcc/fortran/simplify.cc | 4 ++--
.../gfortran.dg/dec_ichar_with_string_1.f | 21 +++++++++++++++++++
3 files changed, 24 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/gfortran.dg/dec_ichar_with_string_1.f
-diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
+diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 82db8e4e1b2..623c1cc470e 100644
---- a/gcc/fortran/check.c
-+++ b/gcc/fortran/check.c
+--- a/gcc/fortran/check.cc
++++ b/gcc/fortran/check.cc
@@ -3157,7 +3157,7 @@ gfc_check_ichar_iachar (gfc_expr *c, gfc_expr *kind)
else
return true;
@@ -24,10 +24,10 @@ index 82db8e4e1b2..623c1cc470e 100644
{
gfc_error ("Argument of %s at %L must be of length one",
gfc_current_intrinsic, &c->where);
-diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
+diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc
index 23317a2e2d9..9900572424f 100644
---- a/gcc/fortran/simplify.c
-+++ b/gcc/fortran/simplify.c
+--- a/gcc/fortran/simplify.cc
++++ b/gcc/fortran/simplify.cc
@@ -3261,7 +3261,7 @@ gfc_simplify_iachar (gfc_expr *e, gfc_expr *kind)
if (e->expr_type != EXPR_CONSTANT)
return NULL;
diff --git a/gcc12-fortran-fdec-non-integer-index.patch b/gcc12-fortran-fdec-non-integer-index.patch
index 074df3b..2c168fe 100644
--- a/gcc12-fortran-fdec-non-integer-index.patch
+++ b/gcc12-fortran-fdec-non-integer-index.patch
@@ -6,8 +6,8 @@ Subject: [PATCH 04/10] Allow non-integer substring indexes
Use -fdec-non-integer-index compiler flag to enable. Also enabled by -fdec.
---
gcc/fortran/lang.opt | 4 ++++
- gcc/fortran/options.c | 1 +
- gcc/fortran/resolve.c | 20 +++++++++++++++++++
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/resolve.cc | 20 +++++++++++++++++++
.../dec_not_integer_substring_indexes_1.f | 18 +++++++++++++++++
.../dec_not_integer_substring_indexes_2.f | 18 +++++++++++++++++
.../dec_not_integer_substring_indexes_3.f | 18 +++++++++++++++++
@@ -31,10 +31,10 @@ index c4da248f07c..d527c106bd6 100644
fdec-structure
Fortran Var(flag_dec_structure)
Enable support for DEC STRUCTURE/RECORD.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index f19ba87f8a0..9a042f64881 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -78,6 +78,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_blank_format_item, value, value);
SET_BITFLAG (flag_dec_char_conversions, value, value);
@@ -43,10 +43,10 @@ index f19ba87f8a0..9a042f64881 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 4b90cb59902..bc0df0fdb99 100644
---- a/gcc/fortran/resolve.c
-+++ b/gcc/fortran/resolve.c
+--- a/gcc/fortran/resolve.cc
++++ b/gcc/fortran/resolve.cc
@@ -5131,6 +5131,16 @@ gfc_resolve_substring (gfc_ref *ref, bool *equal_length)
if (!gfc_resolve_expr (ref->u.ss.start))
return false;
diff --git a/gcc12-fortran-fdec-non-logical-if.patch b/gcc12-fortran-fdec-non-logical-if.patch
index 0133d23..24a8fa4 100644
--- a/gcc12-fortran-fdec-non-logical-if.patch
+++ b/gcc12-fortran-fdec-non-logical-if.patch
@@ -6,8 +6,8 @@ Subject: [PATCH 07/10] Allow non-logical expressions in IF statements
Use -fdec-non-logical-if to enable feature. Also enabled using -fdec.
---
gcc/fortran/lang.opt | 4 ++
- gcc/fortran/options.c | 1 +
- gcc/fortran/resolve.c | 60 ++++++++++++++++---
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/resolve.cc | 60 ++++++++++++++++---
...gical_expressions_if_statements_blocks_1.f | 25 ++++++++
...gical_expressions_if_statements_blocks_2.f | 25 ++++++++
...gical_expressions_if_statements_blocks_3.f | 25 ++++++++
@@ -37,10 +37,10 @@ index 4a269ebb22d..d886c2f33ed 100644
fdec-old-init
Fortran Var(flag_dec_old_init)
Enable support for old style initializers in derived types.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index edbab483b36..a946c86790a 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -81,6 +81,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_non_integer_index, value, value);
SET_BITFLAG (flag_dec_old_init, value, value);
@@ -49,10 +49,10 @@ index edbab483b36..a946c86790a 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index bc0df0fdb99..07dd039f3bf 100644
---- a/gcc/fortran/resolve.c
-+++ b/gcc/fortran/resolve.c
+--- a/gcc/fortran/resolve.cc
++++ b/gcc/fortran/resolve.cc
@@ -10789,10 +10789,31 @@ gfc_resolve_blocks (gfc_code *b, gfc_namespace *ns)
switch (b->op)
{
diff --git a/gcc12-fortran-fdec-old-init.patch b/gcc12-fortran-fdec-old-init.patch
index 8554f2e..d5661c8 100644
--- a/gcc12-fortran-fdec-old-init.patch
+++ b/gcc12-fortran-fdec-old-init.patch
@@ -9,9 +9,9 @@ Only single value expressions are allowed at the moment.
Use -fdec-old-init to enable. Also enabled by -fdec.
---
- gcc/fortran/decl.c | 27 +++++++++++++++----
+ gcc/fortran/decl.cc | 27 +++++++++++++++----
gcc/fortran/lang.opt | 4 +++
- gcc/fortran/options.c | 1 +
+ gcc/fortran/options.cc | 1 +
...ec_derived_types_initialised_old_style_1.f | 25 +++++++++++++++++
...ec_derived_types_initialised_old_style_2.f | 25 +++++++++++++++++
...ec_derived_types_initialised_old_style_3.f | 26 ++++++++++++++++++
@@ -20,10 +20,10 @@ Use -fdec-old-init to enable. Also enabled by -fdec.
create mode 100644 gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_2.f
create mode 100644 gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_3.f
-diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
+diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc
index 723915822f3..5c8c1b7981b 100644
---- a/gcc/fortran/decl.c
-+++ b/gcc/fortran/decl.c
+--- a/gcc/fortran/decl.cc
++++ b/gcc/fortran/decl.cc
@@ -2827,12 +2827,29 @@ variable_decl (int elem)
but not components of derived types. */
else if (gfc_current_state () == COMP_DERIVED)
@@ -74,10 +74,10 @@ index d527c106bd6..25cc948699b 100644
fdec-structure
Fortran Var(flag_dec_structure)
Enable support for DEC STRUCTURE/RECORD.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index 9a042f64881..d6bd36c3a8a 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -79,6 +79,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_char_conversions, value, value);
SET_BITFLAG (flag_dec_duplicates, value, value);
diff --git a/gcc12-fortran-fdec-override-kind.patch b/gcc12-fortran-fdec-override-kind.patch
index e1c7b83..4df6ead 100644
--- a/gcc12-fortran-fdec-override-kind.patch
+++ b/gcc12-fortran-fdec-override-kind.patch
@@ -35,9 +35,9 @@ caused an internal compiler error.
Contributed by Mark Eggleston
---
- gcc/fortran/decl.c | 156 ++++++++++++++----
+ gcc/fortran/decl.cc | 156 ++++++++++++++----
gcc/fortran/lang.opt | 4 +
- gcc/fortran/options.c | 1 +
+ gcc/fortran/options.cc | 1 +
.../dec_mixed_char_array_declaration_1.f | 13 ++
.../dec_mixed_char_array_declaration_2.f | 13 ++
.../dec_mixed_char_array_declaration_3.f | 13 ++
@@ -62,10 +62,10 @@ Contributed by Mark Eggleston
create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_7.f
create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_8.f
-diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
+diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc
index 5c8c1b7981b..f7dc9d8263d 100644
---- a/gcc/fortran/decl.c
-+++ b/gcc/fortran/decl.c
+--- a/gcc/fortran/decl.cc
++++ b/gcc/fortran/decl.cc
@@ -1213,6 +1213,54 @@ syntax:
return MATCH_ERROR;
}
@@ -292,10 +292,10 @@ index 25cc948699b..4a269ebb22d 100644
fdec-old-init
Fortran Var(flag_dec_old_init)
Enable support for old style initializers in derived types.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index d6bd36c3a8a..edbab483b36 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -80,6 +80,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_duplicates, value, value);
SET_BITFLAG (flag_dec_non_integer_index, value, value);
diff --git a/gcc12-fortran-fdec-promotion.patch b/gcc12-fortran-fdec-promotion.patch
index 36e0ff0..a20d151 100644
--- a/gcc12-fortran-fdec-promotion.patch
+++ b/gcc12-fortran-fdec-promotion.patch
@@ -11,12 +11,12 @@ Jeff Law
Re-worked by Mark Eggleston
---
- gcc/fortran/check.c | 71 +++++-
- gcc/fortran/intrinsic.c | 5 +
- gcc/fortran/iresolve.c | 91 ++++---
+ gcc/fortran/check.cc | 71 +++++-
+ gcc/fortran/intrinsic.cc | 5 +
+ gcc/fortran/iresolve.cc | 91 ++++---
gcc/fortran/lang.opt | 4 +
- gcc/fortran/options.c | 1 +
- gcc/fortran/simplify.c | 240 ++++++++++++++----
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/simplify.cc | 240 ++++++++++++++----
...trinsic_int_real_array_const_promotion_1.f | 18 ++
...trinsic_int_real_array_const_promotion_2.f | 18 ++
...trinsic_int_real_array_const_promotion_3.f | 18 ++
@@ -51,10 +51,10 @@ Re-worked by Mark Eggleston
create mode 100644 gcc/testsuite/gfortran.dg/dec_kind_promotion-2.f
create mode 100644 gcc/testsuite/gfortran.dg/dec_kind_promotion-3.f
-diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
+diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 623c1cc470e..e20a834a860 100644
---- a/gcc/fortran/check.c
-+++ b/gcc/fortran/check.c
+--- a/gcc/fortran/check.cc
++++ b/gcc/fortran/check.cc
@@ -1396,12 +1396,40 @@ gfc_check_allocated (gfc_expr *array)
}
@@ -160,10 +160,10 @@ index 623c1cc470e..e20a834a860 100644
if (!int_or_real_check (a, 0))
return false;
-diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
+diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc
index e68eff8bdbb..81b3a24c2be 100644
---- a/gcc/fortran/intrinsic.c
-+++ b/gcc/fortran/intrinsic.c
+--- a/gcc/fortran/intrinsic.cc
++++ b/gcc/fortran/intrinsic.cc
@@ -4467,6 +4467,11 @@ check_arglist (gfc_actual_arglist **ap, gfc_intrinsic_sym *sym,
if (ts.kind == 0)
ts.kind = actual->expr->ts.kind;
@@ -176,10 +176,10 @@ index e68eff8bdbb..81b3a24c2be 100644
if (!gfc_compare_types (&ts, &actual->expr->ts))
{
if (error_flag)
-diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
+diff --git a/gcc/fortran/iresolve.cc b/gcc/fortran/iresolve.cc
index e17fe45f080..b9cdaff2499 100644
---- a/gcc/fortran/iresolve.c
-+++ b/gcc/fortran/iresolve.c
+--- a/gcc/fortran/iresolve.cc
++++ b/gcc/fortran/iresolve.cc
@@ -817,19 +817,22 @@ gfc_resolve_dble (gfc_expr *f, gfc_expr *a)
void
gfc_resolve_dim (gfc_expr *f, gfc_expr *a, gfc_expr *p)
@@ -340,10 +340,10 @@ index d886c2f33ed..4ca2f93f2df 100644
fdec-structure
Fortran Var(flag_dec_structure)
Enable support for DEC STRUCTURE/RECORD.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index a946c86790a..15079c7e95a 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -82,6 +82,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_old_init, value, value);
SET_BITFLAG (flag_dec_override_kind, value, value);
@@ -352,10 +352,10 @@ index a946c86790a..15079c7e95a 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
+diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc
index 9900572424f..3419e06fec2 100644
---- a/gcc/fortran/simplify.c
-+++ b/gcc/fortran/simplify.c
+--- a/gcc/fortran/simplify.cc
++++ b/gcc/fortran/simplify.cc
@@ -2333,39 +2333,79 @@ gfc_simplify_digits (gfc_expr *x)
}
diff --git a/gcc12-fortran-fdec-sequence.patch b/gcc12-fortran-fdec-sequence.patch
index 7b9ce71..d79348e 100644
--- a/gcc12-fortran-fdec-sequence.patch
+++ b/gcc12-fortran-fdec-sequence.patch
@@ -7,8 +7,8 @@ Subject: [PATCH 09/10] Add the SEQUENCE attribute by default if it's not
Use -fdec-sequence to enable this feature. Also enabled by -fdec.
---
gcc/fortran/lang.opt | 4 ++
- gcc/fortran/options.c | 1 +
- gcc/fortran/resolve.c | 13 ++++-
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/resolve.cc | 13 ++++-
...dd_SEQUENCE_to_COMMON_block_by_default_1.f | 57 +++++++++++++++++++
...dd_SEQUENCE_to_COMMON_block_by_default_2.f | 57 +++++++++++++++++++
...dd_SEQUENCE_to_COMMON_block_by_default_3.f | 57 +++++++++++++++++++
@@ -32,10 +32,10 @@ index 4ca2f93f2df..019c798cf09 100644
fdec-structure
Fortran Var(flag_dec_structure)
Enable support for DEC STRUCTURE/RECORD.
-diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
index 15079c7e95a..050f56fdc25 100644
---- a/gcc/fortran/options.c
-+++ b/gcc/fortran/options.c
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
@@ -83,6 +83,7 @@ set_dec_flags (int value)
SET_BITFLAG (flag_dec_override_kind, value, value);
SET_BITFLAG (flag_dec_non_logical_if, value, value);
@@ -44,10 +44,10 @@ index 15079c7e95a..050f56fdc25 100644
}
/* Finalize DEC flags. */
-diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 07dd039f3bf..fe7d0cc5944 100644
---- a/gcc/fortran/resolve.c
-+++ b/gcc/fortran/resolve.c
+--- a/gcc/fortran/resolve.cc
++++ b/gcc/fortran/resolve.cc
@@ -978,9 +978,16 @@ resolve_common_vars (gfc_common_head *common_block, bool named_common)
if (!(csym->ts.u.derived->attr.sequence
diff --git a/gcc12-fortran-flogical-as-integer.patch b/gcc12-fortran-flogical-as-integer.patch
index 41cbf60..28df5e1 100644
--- a/gcc12-fortran-flogical-as-integer.patch
+++ b/gcc12-fortran-flogical-as-integer.patch
@@ -14,7 +14,7 @@ Note: using this feature will disable bitwise logical operations enabled by
-fdec.
---
gcc/fortran/lang.opt | 4 ++
- gcc/fortran/resolve.c | 55 ++++++++++++++++++-
+ gcc/fortran/resolve.cc | 55 ++++++++++++++++++-
.../logical_to_integer_and_vice_versa_1.f | 31 +++++++++++
.../logical_to_integer_and_vice_versa_2.f | 31 +++++++++++
.../logical_to_integer_and_vice_versa_3.f | 33 +++++++++++
@@ -40,10 +40,10 @@ index 52bd522051e..c4da248f07c 100644
fdefault-double-8
Fortran Var(flag_default_double)
Set the default double precision kind to an 8 byte wide type.
-diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index c075d0fa0c4..4b90cb59902 100644
---- a/gcc/fortran/resolve.c
-+++ b/gcc/fortran/resolve.c
+--- a/gcc/fortran/resolve.cc
++++ b/gcc/fortran/resolve.cc
@@ -3915,7 +3915,6 @@ lookup_uop_fuzzy (const char *op, gfc_symtree *uop)
return gfc_closest_fuzzy_match (op, candidates);
}
diff --git a/gcc12-hack.patch b/gcc12-hack.patch
index 3a5f3f3..e98649e 100644
--- a/gcc12-hack.patch
+++ b/gcc12-hack.patch
@@ -65,8 +65,8 @@
GOCFLAGS="$(GOCFLAGS) $${flags}" \
GDCFLAGS="$(GDCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
---- libcpp/macro.c.jj 2019-01-09 13:01:21.420552123 +0100
-+++ libcpp/macro.c 2019-01-11 18:18:17.736876285 +0100
+--- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100
++++ libcpp/macro.cc 2019-01-11 18:18:17.736876285 +0100
@@ -3256,8 +3256,6 @@ static cpp_macro *
create_iso_definition (cpp_reader *pfile)
{
@@ -98,8 +98,8 @@
goto out;
}
---- libcpp/expr.c.jj 2019-01-09 13:01:22.415535734 +0100
-+++ libcpp/expr.c 2019-01-11 18:16:23.444726882 +0100
+--- libcpp/expr.cc.jj 2019-01-09 13:01:22.415535734 +0100
++++ libcpp/expr.cc 2019-01-11 18:16:23.444726882 +0100
@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile,
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
&& CPP_OPTION (pfile, cpp_warn_long_long))
diff --git a/gcc12-isl-dl.patch b/gcc12-isl-dl.patch
index b3982f9..825fb88 100644
--- a/gcc12-isl-dl.patch
+++ b/gcc12-isl-dl.patch
@@ -626,8 +626,8 @@
+extern const char *get_isl_version (bool);
#endif
---- gcc/graphite.c.jj 2015-11-04 14:15:32.000000000 +0100
-+++ gcc/graphite.c 2015-11-04 14:56:02.645536409 +0100
+--- gcc/graphite.cc.jj 2015-11-04 14:15:32.000000000 +0100
++++ gcc/graphite.cc 2015-11-04 14:56:02.645536409 +0100
@@ -60,6 +60,35 @@ along with GCC; see the file COPYING3.
#include "tree-into-ssa.h"
#include "graphite.h"
@@ -695,8 +695,8 @@
#else /* If isl is not available: #ifndef HAVE_isl. */
static void
---- gcc/toplev.c.jj 2017-02-19 13:02:31.000000000 +0100
-+++ gcc/toplev.c 2017-02-19 16:50:25.536301350 +0100
+--- gcc/toplev.cc.jj 2017-02-19 13:02:31.000000000 +0100
++++ gcc/toplev.cc 2017-02-19 16:50:25.536301350 +0100
@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3.
#ifdef HAVE_isl
diff --git a/gcc12-isl-dl2.patch b/gcc12-isl-dl2.patch
index e16672c..5402a8e 100644
--- a/gcc12-isl-dl2.patch
+++ b/gcc12-isl-dl2.patch
@@ -1,12 +1,12 @@
2011-04-04 Jakub Jelinek
- * toplev.c (toplev_main_argv): New variable.
+ * toplev.cc (toplev_main_argv): New variable.
(toplev_main): Initialize it.
- * graphite.c (init_isl_pointers): Load libisl.so.15 from gcc's private
+ * graphite.cc (init_isl_pointers): Load libisl.so.15 from gcc's private
directory.
---- gcc/toplev.c.jj 2008-12-09 23:59:10.000000000 +0100
-+++ gcc/toplev.c 2009-01-27 14:33:52.000000000 +0100
+--- gcc/toplev.cc.jj 2008-12-09 23:59:10.000000000 +0100
++++ gcc/toplev.cc 2009-01-27 14:33:52.000000000 +0100
@@ -113,6 +113,8 @@ static void finalize (bool);
static void crash_signal (int) ATTRIBUTE_NORETURN;
static void compile_file (void);
@@ -25,8 +25,8 @@
/* Initialization of GCC's environment, and diagnostics. */
general_init (argv[0], m_init_signals);
---- gcc/graphite.c.jj 2010-12-01 10:24:32.000000000 -0500
-+++ gcc/graphite.c 2010-12-01 11:46:07.832118193 -0500
+--- gcc/graphite.cc.jj 2010-12-01 10:24:32.000000000 -0500
++++ gcc/graphite.cc 2010-12-01 11:46:07.832118193 -0500
@@ -64,11 +64,39 @@ __typeof (isl_pointers__) isl_pointers__
static bool
init_isl_pointers (void)
diff --git a/gcc12-libstdc++-docs.patch b/gcc12-libstdc++-docs.patch
index 25aa718..cdcd435 100644
--- a/gcc12-libstdc++-docs.patch
+++ b/gcc12-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 12.0.0
++ Release 12.0.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 12.0.0 release,
++ for the 12.0.1 release,
+ online
for each GCC release
and
diff --git a/gcc12-pr104025.patch b/gcc12-pr104025.patch
new file mode 100644
index 0000000..3010236
--- /dev/null
+++ b/gcc12-pr104025.patch
@@ -0,0 +1,42 @@
+2022-01-18 Jakub Jelinek
+
+ PR c++/104025
+ * parser.cc (cp_parser_id_expression): Save and restore input_location
+ around cp_parser_skip_entire_template_parameter_list call for
+ -Wmissing-template-keyword.
+
+ * g++.dg/warn/pr104025.C: New test.
+
+--- gcc/cp/parser.cc.jj 2022-01-17 18:05:04.797307506 +0100
++++ gcc/cp/parser.cc 2022-01-17 20:27:33.642711859 +0100
+@@ -6254,6 +6254,7 @@ cp_parser_id_expression (cp_parser *pars
+ OPT_Wmissing_template_keyword))
+ {
+ saved_token_sentinel toks (parser->lexer, STS_ROLLBACK);
++ iloc_sentinel ils (UNKNOWN_LOCATION);
+ if (cp_parser_skip_entire_template_parameter_list (parser)
+ /* An operator after the > suggests that the > ends a
+ template-id; a name or literal suggests that the > is an
+--- gcc/testsuite/g++.dg/warn/pr104025.C.jj 2022-01-17 20:31:17.320591249 +0100
++++ gcc/testsuite/g++.dg/warn/pr104025.C 2022-01-17 20:31:09.068706373 +0100
+@@ -0,0 +1,20 @@
++// PR c++/104025
++// { dg-do compile }
++// { dg-options "-Wmissing-template-keyword -fcompare-debug" }
++
++void bar (int);
++
++struct S { int i; };
++
++template
++struct T
++{
++ int m;
++ C c;
++ void foo ()
++ {
++ bar (c.i < m);
++ }
++};
++
++template void T::foo ();
diff --git a/sources b/sources
index 62293b2..5e6f821 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-12.0.0-20220115.tar.xz) = 27eb968a3dc3387ef381c8b58a874eec2db6c57cf71ca9c6492d9078776b9d5d29e2d4ccd643568e6e4967ec7a6b531690d51d9355e2ef66bb2978dc08b8005f
+SHA512 (gcc-12.0.1-20220118.tar.xz) = 903418bda48240537a0f7b74687e70042d56cea7bc079319380098c3465079d064083e5d6bad4d9d44bcf7e7f929dd6f692ab638ff40824e8f2f2712991f9290
SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
diff --git a/update-gcc.sh b/update-gcc.sh
index 4592048..b9e8330 100755
--- a/update-gcc.sh
+++ b/update-gcc.sh
@@ -3,5 +3,5 @@
git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin $1
d=`date --iso | sed 's/-//g'`
-git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-12.0.0-$d/ $1 | xz -9e > gcc-12.0.0-$d.tar.xz
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-12.0.1-$d/ $1 | xz -9e > gcc-12.0.1-$d.tar.xz
rm -rf gcc-dir.tmp