diff --git a/0090-State-sysroot-option-as-validated-once-processed.patch b/0090-State-sysroot-option-as-validated-once-processed.patch new file mode 100644 index 0000000000000000000000000000000000000000..a3da278ef15d6377f946b4aac124bbb10dae3981 --- /dev/null +++ b/0090-State-sysroot-option-as-validated-once-processed.patch @@ -0,0 +1,30 @@ +From a7c23eb36641d605df37f5942d188a764a2480f9 Mon Sep 17 00:00:00 2001 +From: huitailangzju <804544223@qq.com> +Date: Tue, 14 Feb 2023 10:54:10 +0800 +Subject: [PATCH] State --sysroot option as validated once processed + +[Reference] https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=8e86086bd33134467cc9c2a75327d1238dc71df9 + +Since we now save the option in the "switches" table +to let specs use it more generally, we need to explicitly +state that the option was validated else the driver +will consider it "unrecognized". +--- + gcc/gcc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 655beffcc..efa0b53ce 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4193,6 +4193,7 @@ driver_handle_option (struct gcc_options *opts, + /* Saving this option is useful to let self-specs decide to + provide a default one. */ + do_save = true; ++ validated = true; + break; + + case OPT_time_: +-- +2.28.0.windows.1 + diff --git a/0091-bogus-Wstringop-overflow-with-VLA-of-elements-larger.patch b/0091-bogus-Wstringop-overflow-with-VLA-of-elements-larger.patch new file mode 100644 index 0000000000000000000000000000000000000000..fb5180897829227ef74f45075ffa80f7141bd526 --- /dev/null +++ b/0091-bogus-Wstringop-overflow-with-VLA-of-elements-larger.patch @@ -0,0 +1,129 @@ +From bf537e82d452ee9b79f438df721c2e0dfaae12a0 Mon Sep 17 00:00:00 2001 +From: Xiong Zhou +Date: Fri, 5 May 2023 11:57:40 +0800 +Subject: [PATCH 1/2] - bogus -Wstringop-overflow with VLA of elements larger + than byte + +--- + gcc/calls.c | 5 ++ + gcc/testsuite/gcc.dg/Wstringop-overflow-67.c | 92 ++++++++++++++++++++ + 2 files changed, 97 insertions(+) + create mode 100644 gcc/testsuite/gcc.dg/Wstringop-overflow-67.c + +diff --git a/gcc/calls.c b/gcc/calls.c +index 26894342c..45c137cee 100644 +--- a/gcc/calls.c ++++ b/gcc/calls.c +@@ -2112,6 +2112,11 @@ maybe_warn_rdwr_sizes (rdwr_map *rwm, tree fndecl, tree fntype, tree exp) + } + else + { ++ /* If the size cannot be determined clear it to keep it from ++ being taken as real (and excessive). */ ++ if (objsize && integer_all_onesp (objsize)) ++ objsize = NULL_TREE; ++ + /* For read-only and read-write attributes also set the source + size. */ + srcsize = objsize; +diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c +new file mode 100644 +index 000000000..7b8f3f014 +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-67.c +@@ -0,0 +1,92 @@ ++/* PR middle-end/100571 - bogus -Wstringop-overflow with VLA of elements ++ larger than byte ++ { dg-do compile } ++ { dg-options "-O2 -Wall" } */ ++ ++__attribute__ ((access (read_only, 1, 2))) void fro (int *, int); ++__attribute__ ((access (write_only, 1, 2))) void fwo (int *, int); ++__attribute__ ((access (read_write, 1, 2))) void frw (int *, int); ++ ++extern __SIZE_TYPE__ n; ++ ++void alloca_ro (void) ++{ ++ int *a = __builtin_alloca (n * sizeof *a); ++ a[0] = 0; ++ fro (a, n); ++} ++ ++void alloca_wo (void) ++{ ++ int *a = __builtin_alloca (n * sizeof *a); ++ fwo (a, n); ++} ++ ++void alloca_rw (void) ++{ ++ int *a = __builtin_alloca (n * sizeof *a); ++ a[0] = 0; ++ frw (a, n); ++} ++ ++ ++void calloc_ro (void) ++{ ++ int *a = __builtin_calloc (n, sizeof *a); ++ fro (a, n); ++} ++ ++void calloc_wo (void) ++{ ++ int *a = __builtin_calloc (n, sizeof *a); ++ fwo (a, n); ++} ++ ++void calloc_rw (void) ++{ ++ int *a = __builtin_calloc (n, sizeof *a); ++ a[0] = 0; ++ frw (a, n); ++} ++ ++ ++void malloc_ro (void) ++{ ++ int *a = __builtin_malloc (n * sizeof *a); ++ a[0] = 0; ++ fro (a, n); ++} ++ ++void malloc_wo (void) ++{ ++ int *a = __builtin_malloc (n * sizeof *a); ++ fwo (a, n); ++} ++ ++void malloc_rw (void) ++{ ++ int *a = __builtin_malloc (n * sizeof *a); ++ a[0] = 0; ++ frw (a, n); ++} ++ ++ ++void vla_ro (void) ++{ ++ int a[n]; ++ a[0] = 0; ++ fro (a, n); ++} ++ ++void vla_wo (void) ++{ ++ int a[n]; ++ fwo (a, n); ++} ++ ++void vla_rw (void) ++{ ++ int a[n]; ++ a[0] = 0; ++ frw (a, n); ++} +-- +2.33.0 + diff --git a/0092-phiopt2-Add-option-to-control-the-simplify.patch b/0092-phiopt2-Add-option-to-control-the-simplify.patch new file mode 100644 index 0000000000000000000000000000000000000000..b37c1e855f9c0294136e2d3208eeda39f3f4977c --- /dev/null +++ b/0092-phiopt2-Add-option-to-control-the-simplify.patch @@ -0,0 +1,183 @@ +From bc6537191e91c854cc6bee3319290d7a86768957 Mon Sep 17 00:00:00 2001 +From: zhongyunde +Date: Wed, 10 May 2023 18:39:47 +0800 +Subject: [PATCH 2/2] [phiopt2] Add option to control the simplify + +The phiopt is brought in https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=c4574d23cb07340918793a5a98ae7bb2988b3791 +But may be also has some bug fixed by later commit, so disable it default temporary. +This optimization is expected to enable after we update the gcc'base to gcc12's release version. +--- + gcc/common.opt | 4 ++++ + gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/bool-1.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/bool-2.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/phi-opt-22.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/pr18134.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/pr21829.c | 2 +- + gcc/testsuite/gcc.dg/tree-ssa/pr96928-1.c | 4 ++-- + gcc/tree-ssa-phiopt.c | 3 +++ + 13 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/gcc/common.opt b/gcc/common.opt +index be7bfee60..5ad2def18 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -2781,6 +2781,10 @@ ftree-store-ccp + Common Ignore + Does nothing. Preserved for backward compatibility. + ++ftree-fold-phiopt ++Common Report Var(flag_fold_phiopt) Init(0) Optimization ++Attempt to simply the phi node with ssa form. ++ + ftree-ch + Common Report Var(flag_tree_ch) Optimization + Enable loop header copying on trees. +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c +index 364ce6a69..b04316d55 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/20040514-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-phiopt2-details" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-phiopt2-details" } */ + + int t( int i) + { +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bool-1.c b/gcc/testsuite/gcc.dg/tree-ssa/bool-1.c +index 401357f2f..892654108 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/bool-1.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/bool-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int f(_Bool x) + { +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/bool-2.c b/gcc/testsuite/gcc.dg/tree-ssa/bool-2.c +index add9cca1e..5ead90f06 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/bool-2.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/bool-2.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int f(_Bool x) + { +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c +index 4c190e6af..7b678fafc 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int nem1_phi (unsigned long a) { return a ? -1 : 0; } + int eqm1_phi (unsigned long a) { return a ? 0 : -1; } +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-22.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-22.c +index fd3706666..23b679644 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-22.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-22.c +@@ -1,6 +1,6 @@ + /* PR tree-optimization/97690 */ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-phiopt2" } */ ++/* { dg-options "-O2 -ftree-fold-phiopt -fdump-tree-phiopt2" } */ + + int foo (_Bool d) { return d ? 2 : 0; } + int bar (_Bool d) { return d ? 1 : 0; } +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c +index 3bdb85609..4efd9afc4 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-4.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + _Bool t(); + _Bool t1(); +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c +index 18ecbd52a..60dcc6733 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int g(int,int); + int f(int t, int c) +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c +index 98c596b6a..aaa71a317 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -fdump-tree-optimized -fdump-tree-phiopt2" } */ ++/* { dg-options "-O -ftree-fold-phiopt -fdump-tree-optimized -fdump-tree-phiopt2" } */ + + int g(int,int); + int f(int t, int c) +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18134.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18134.c +index cd40ab2c1..efb1907cf 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/pr18134.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18134.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O1 -fdump-tree-optimized" } */ ++/* { dg-options "-O1 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int foo (int a) + { +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c +index 8f5ae5127..8c8ada905 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21829.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-optimized" } */ ++/* { dg-options "-O2 -ftree-fold-phiopt -fdump-tree-optimized" } */ + + int test(int v) + { +diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96928-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96928-1.c +index a2770e5e8..88c13806a 100644 +--- a/gcc/testsuite/gcc.dg/tree-ssa/pr96928-1.c ++++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96928-1.c +@@ -1,9 +1,9 @@ + /* PR tree-optimization/96928 */ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-phiopt2" } */ ++/* { dg-options "-O2 -ftree-fold-phiopt -fdump-tree-phiopt2 -fdump-tree-optimized" } */ + /* { dg-final { scan-tree-dump-times " = a_\[0-9]*\\\(D\\\) >> " 5 "phiopt2" } } */ + /* { dg-final { scan-tree-dump-times " = ~c_\[0-9]*\\\(D\\\);" 1 "phiopt2" } } */ +-/* { dg-final { scan-tree-dump-times " = ~" 1 "phiopt2" } } */ ++/* { dg-final { scan-tree-dump-times " = ~" 1 "optimized" } } */ + /* { dg-final { scan-tree-dump-times " = \[abc_0-9\\\(\\\)D]* \\\^ " 5 "phiopt2" } } */ + /* { dg-final { scan-tree-dump-not "a < 0" "phiopt2" } } */ + +diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c +index 51a2d3684..b7012932f 100644 +--- a/gcc/tree-ssa-phiopt.c ++++ b/gcc/tree-ssa-phiopt.c +@@ -839,6 +839,9 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, + tree result; + gimple *stmt_to_move = NULL; + ++ if (!flag_fold_phiopt) ++ return false; ++ + /* Special case A ? B : B as this will always simplify to B. */ + if (operand_equal_for_phi_arg_p (arg0, arg1)) + return false; +-- +2.33.0 + diff --git a/0093-gimple-Factor-the-code-to-avoid-depending-auto-featu.patch b/0093-gimple-Factor-the-code-to-avoid-depending-auto-featu.patch new file mode 100644 index 0000000000000000000000000000000000000000..c73e472d859ebdb27fe61fc5d46652d4b6c384dd --- /dev/null +++ b/0093-gimple-Factor-the-code-to-avoid-depending-auto-featu.patch @@ -0,0 +1,170 @@ +From 3cddb0b4960e5983404bbebb11e31ffb62e98350 Mon Sep 17 00:00:00 2001 +From: zhongyunde +Date: Sat, 13 May 2023 10:04:02 +0800 +Subject: [PATCH 1/5] [gimple] Factor the code to avoid depending auto feature + +The lambda function with captrue can't use a function pointer +to express, so use a class to model. +--- + gcc/config/aarch64/aarch64.c | 8 +-- + gcc/gimple-match-head.c | 115 ++++++++++++++++++++++++----------- + 2 files changed, 85 insertions(+), 38 deletions(-) + +diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c +index 85dbd3898..10e037325 100644 +--- a/gcc/config/aarch64/aarch64.c ++++ b/gcc/config/aarch64/aarch64.c +@@ -3098,10 +3098,10 @@ aarch64_maxmin_plus_const (rtx_code code, rtx *operands, bool generate_p) + == x <= y ? x - y : 0 [z == y] + == x < y ? x - y : 0 [z == y] + == x < y + 1 ? x - (y + 1) : -1 [z == y + 1]. */ +- auto maxmin_val = rtx_mode_t (maxmin_op, mode); +- auto add_val = rtx_mode_t (add_op, mode); +- auto sub_val = wi::neg (add_val); +- auto diff = wi::sub (maxmin_val, sub_val); ++ rtx_mode_t maxmin_val = rtx_mode_t (maxmin_op, mode); ++ rtx_mode_t add_val = rtx_mode_t (add_op, mode); ++ wide_int sub_val = wi::neg (add_val); ++ wide_int diff = wi::sub (maxmin_val, sub_val); + if (!(diff == 0 + || (diff == 1 && wi::gt_p (maxmin_val, sub_val, sgn)) + || (diff == -1 && wi::lt_p (maxmin_val, sub_val, sgn)))) +diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c +index c1dea1734..061aef39c 100644 +--- a/gcc/gimple-match-head.c ++++ b/gcc/gimple-match-head.c +@@ -1023,10 +1023,87 @@ gimple_extract (gimple *stmt, gimple_match_op *res_op, + bool + gimple_extract_op (gimple *stmt, gimple_match_op *res_op) + { +- auto nop = [](tree op) { return op; }; ++ /* This function is not called by other function now, so leave the ++ lambda to minimize modifiers. */ ++ tree (*nop)(tree) = [](tree op) ++ { ++ return op; ++ }; + return gimple_extract (stmt, res_op, nop, nop); + } + ++/* The std=gnu++98 doesn't support c++ auto feature, and the origin ++ lambda capture some variables, so they can't be replaced with a ++ simple function pointer. */ ++class __lambda_valueize ++{ ++ typedef tree (*tree_op_func)(tree); ++ ++ public: ++ inline tree operator () (tree op) const ++ { ++ return do_valueize (op, top_valueize, valueized); ++ } ++ ++ private: ++ tree_op_func &top_valueize; ++ bool &valueized; ++ ++ public: ++ __lambda_valueize (tree_op_func &_top_valueize, bool &_valueized) ++ : top_valueize{_top_valueize}, valueized {_valueized} ++ {} ++}; ++ ++class __lambda_condition ++{ ++ typedef tree (*tree_op_func)(tree); ++ ++ public: ++ inline tree operator () (tree op) const ++ { ++ bool cond_valueized = false; ++ tree lhs = do_valueize (TREE_OPERAND (op, 0), top_valueize, ++ cond_valueized); ++ tree rhs = do_valueize (TREE_OPERAND (op, 1), top_valueize, ++ cond_valueized); ++ gimple_match_op res_op2 (res_op->cond, TREE_CODE (op), ++ TREE_TYPE (op), lhs, rhs); ++ if ((gimple_resimplify2 (seq, &res_op2, valueize) || cond_valueized) ++ && res_op2.code.is_tree_code ()) ++ { ++ if (TREE_CODE_CLASS ((tree_code) res_op2.code) == tcc_comparison) ++ { ++ valueized = true; ++ return build2 (res_op2.code, TREE_TYPE (op), res_op2.ops[0], ++ res_op2.ops[1]); ++ } ++ else if (res_op2.code == SSA_NAME ++ || res_op2.code == INTEGER_CST ++ || res_op2.code == VECTOR_CST) ++ { ++ valueized = true; ++ return res_op2.ops[0]; ++ } ++ } ++ return do_valueize (op, top_valueize, valueized); ++ } ++ ++ private: ++ tree_op_func &top_valueize; ++ tree_op_func &valueize; ++ bool &valueized; ++ gimple_match_op *&res_op; ++ gimple_seq *&seq; ++ ++ public: ++ __lambda_condition (tree_op_func &_top_valueize, tree_op_func &_valueize, ++ bool &_valueized, gimple_match_op *&_res_op, gimple_seq *&_seq) ++ : top_valueize{_top_valueize}, valueize{_valueize}, valueized {_valueized}, ++ res_op {_res_op}, seq {_seq} ++ {} ++}; ++ + /* The main STMT based simplification entry. It is used by the fold_stmt + and the fold_stmt_to_constant APIs. */ + +@@ -1035,39 +1112,9 @@ gimple_simplify (gimple *stmt, gimple_match_op *res_op, gimple_seq *seq, + tree (*valueize)(tree), tree (*top_valueize)(tree)) + { + bool valueized = false; +- auto valueize_op = [&](tree op) +- { +- return do_valueize (op, top_valueize, valueized); +- }; +- auto valueize_condition = [&](tree op) -> tree +- { +- bool cond_valueized = false; +- tree lhs = do_valueize (TREE_OPERAND (op, 0), top_valueize, +- cond_valueized); +- tree rhs = do_valueize (TREE_OPERAND (op, 1), top_valueize, +- cond_valueized); +- gimple_match_op res_op2 (res_op->cond, TREE_CODE (op), +- TREE_TYPE (op), lhs, rhs); +- if ((gimple_resimplify2 (seq, &res_op2, valueize) +- || cond_valueized) +- && res_op2.code.is_tree_code ()) +- { +- if (TREE_CODE_CLASS ((tree_code) res_op2.code) == tcc_comparison) +- { +- valueized = true; +- return build2 (res_op2.code, TREE_TYPE (op), +- res_op2.ops[0], res_op2.ops[1]); +- } +- else if (res_op2.code == SSA_NAME +- || res_op2.code == INTEGER_CST +- || res_op2.code == VECTOR_CST) +- { +- valueized = true; +- return res_op2.ops[0]; +- } +- } +- return valueize_op (op); +- }; ++ __lambda_valueize valueize_op = __lambda_valueize{top_valueize, valueized}; ++ __lambda_condition valueize_condition = __lambda_condition{top_valueize, ++ valueize, valueized, res_op, seq}; + + if (!gimple_extract (stmt, res_op, valueize_op, valueize_condition)) + return false; +-- +2.33.0 + diff --git a/0094-StructReorg-Fix-escape_cast_another_ptr-check-bug.patch b/0094-StructReorg-Fix-escape_cast_another_ptr-check-bug.patch new file mode 100644 index 0000000000000000000000000000000000000000..a0079430f814bf8ce8716f2a1d9d068892506b81 --- /dev/null +++ b/0094-StructReorg-Fix-escape_cast_another_ptr-check-bug.patch @@ -0,0 +1,112 @@ +From 9527d026dceb1e4f9d9f5c117dacfdfa65ce2735 Mon Sep 17 00:00:00 2001 +From: Mingchuan Wu +Date: Tue, 23 May 2023 21:03:58 +0800 +Subject: [PATCH 2/5] [StructReorg] Fix escape_cast_another_ptr check bug + +In the other side check, escape mark is added +when the replacement struct type exists. +--- + gcc/ipa-struct-reorg/ipa-struct-reorg.c | 15 +++--- + .../struct/wo_prof_escape_replace_type.c | 49 +++++++++++++++++++ + 2 files changed, 57 insertions(+), 7 deletions(-) + create mode 100644 gcc/testsuite/gcc.dg/struct/wo_prof_escape_replace_type.c + +diff --git a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +index 2cac340c7..218140f58 100644 +--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c ++++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +@@ -688,6 +688,8 @@ srtype::analyze (void) + info and/or static heuristics to differentiate splitting process. */ + if (fields.length () == 2) + { ++ /* Currently, when the replacement structure type exists, ++ we only split the replacement structure. */ + for (hash_map::iterator it = replace_type_map.begin (); + it != replace_type_map.end (); ++it) + { +@@ -4921,7 +4923,9 @@ ipa_struct_reorg::check_other_side (srdecl *decl, tree other, gimple *stmt, vec< + } + + srtype *t1 = find_type (inner_type (t)); +- if (t1 == type) ++ /* In the other side check, escape mark is added ++ when the replacement struct type exists. */ ++ if (t1 == type || is_replace_type (inner_type (t), type->type)) + { + /* In Complete Struct Relayout opti, if lhs type is the same + as rhs type, we could return without any harm. */ +@@ -4961,13 +4965,10 @@ ipa_struct_reorg::check_other_side (srdecl *decl, tree other, gimple *stmt, vec< + + return; + } +- if (!is_replace_type (inner_type (t), type->type)) +- { +- if (t1) +- t1->mark_escape (escape_cast_another_ptr, stmt); ++ if (t1) ++ t1->mark_escape (escape_cast_another_ptr, stmt); + +- type->mark_escape (escape_cast_another_ptr, stmt); +- } ++ type->mark_escape (escape_cast_another_ptr, stmt); + } + + +diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_replace_type.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_replace_type.c +new file mode 100644 +index 000000000..d0a7b505e +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_replace_type.c +@@ -0,0 +1,49 @@ ++/* { dg-do compile } */ ++ ++#include ++ ++struct AngleDef ++{ ++ double K; ++ double th0; ++}; ++typedef struct AngleDef angldef; ++ ++struct bndangdihe ++{ ++ int nbond; ++ int nangl; ++ int ndihe; ++}; ++typedef struct bndangdihe bah; ++ ++struct ambprmtop ++{ ++ double *AnglK; ++ double *AnglEq; ++ bah nBAH; ++ angldef *AParam; ++ char source[512]; ++ char eprulesource[512]; ++}; ++typedef struct ambprmtop prmtop; ++ ++static void OrderBondParameters (prmtop *tp) ++{ ++ int i; ++ tp->AParam = (angldef *)malloc (tp->nBAH.nangl * sizeof (angldef)); ++ for (i = 0; i < tp->nBAH.nangl; i++) ++ { ++ tp->AParam[i].K = tp->AnglK[i]; ++ tp->AParam[i].th0 = tp->AnglEq[i]; ++ } ++} ++ ++void main () ++{ ++ prmtop *tp = (prmtop *)malloc (100 * sizeof (prmtop)); ++ OrderBondParameters (tp); ++} ++ ++/*---------------------------------------------------------------------------------------------*/ ++/* { dg-final { scan-ipa-dump "No structures to transform in struct split." "struct_reorg" } } */ +-- +2.33.0 + diff --git a/0095-Backport-Fix-zero-masking-for-vcvtps2ph-when-dest-op.patch b/0095-Backport-Fix-zero-masking-for-vcvtps2ph-when-dest-op.patch new file mode 100644 index 0000000000000000000000000000000000000000..10dc835e1399fad3ca53ea5f8dfc33ffe492e756 --- /dev/null +++ b/0095-Backport-Fix-zero-masking-for-vcvtps2ph-when-dest-op.patch @@ -0,0 +1,172 @@ +From 5b473317f6b1890238f1778d0fdebf8ed09292d9 Mon Sep 17 00:00:00 2001 +From: liuhongt +Date: Fri, 29 May 2020 13:38:49 +0800 +Subject: [PATCH 3/5] [Backport] Fix zero-masking for vcvtps2ph when dest + operand is memory. + +Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=43088bb4dadd3d14b6b594c5f9363fe879f3d7f7 + +When dest is memory, zero-masking is not valid, only merging-masking is available, + +2020-06-24 Hongtao Liu + +gcc/ChangeLog: + PR target/95254 + * config/i386/sse.md (*vcvtps2ph_store): + Refine from *vcvtps2ph_store. + (vcvtps2ph256): Refine constraint from vm to v. + (avx512f_vcvtps2ph512): Ditto. + (*vcvtps2ph256): New define_insn. + (*avx512f_vcvtps2ph512): Ditto. + * config/i386/subst.md (merge_mask): New define_subst. + (merge_mask_name): New define_subst_attr. + (merge_mask_operand3): Ditto. + +gcc/testsuite/ChangeLog: + * gcc.target/i386/avx512f-vcvtps2ph-pr95254.c: New test. + * gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c: Ditto. +--- + gcc/config/i386/sse.md | 32 ++++++++++++++++--- + gcc/config/i386/subst.md | 12 +++++++ + .../i386/avx512f-vcvtps2ph-pr95254.c | 12 +++++++ + .../i386/avx512vl-vcvtps2ph-pr95254.c | 18 +++++++++++ + 4 files changed, 70 insertions(+), 4 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-pr95254.c + create mode 100644 gcc/testsuite/gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c + +diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md +index bf01e1d74..915b8e3d2 100644 +--- a/gcc/config/i386/sse.md ++++ b/gcc/config/i386/sse.md +@@ -21354,19 +21354,19 @@ + (set_attr "prefix" "maybe_evex") + (set_attr "mode" "V4SF")]) + +-(define_insn "*vcvtps2ph_store" ++(define_insn "*vcvtps2ph_store" + [(set (match_operand:V4HI 0 "memory_operand" "=m") + (unspec:V4HI [(match_operand:V4SF 1 "register_operand" "v") + (match_operand:SI 2 "const_0_to_255_operand" "N")] + UNSPEC_VCVTPS2PH))] + "TARGET_F16C || TARGET_AVX512VL" +- "vcvtps2ph\t{%2, %1, %0|%0, %1, %2}" ++ "vcvtps2ph\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "type" "ssecvt") + (set_attr "prefix" "maybe_evex") + (set_attr "mode" "V4SF")]) + + (define_insn "vcvtps2ph256" +- [(set (match_operand:V8HI 0 "nonimmediate_operand" "=vm") ++ [(set (match_operand:V8HI 0 "register_operand" "=v") + (unspec:V8HI [(match_operand:V8SF 1 "register_operand" "v") + (match_operand:SI 2 "const_0_to_255_operand" "N")] + UNSPEC_VCVTPS2PH))] +@@ -21377,8 +21377,20 @@ + (set_attr "btver2_decode" "vector") + (set_attr "mode" "V8SF")]) + ++(define_insn "*vcvtps2ph256" ++ [(set (match_operand:V8HI 0 "memory_operand" "=m") ++ (unspec:V8HI [(match_operand:V8SF 1 "register_operand" "v") ++ (match_operand:SI 2 "const_0_to_255_operand" "N")] ++ UNSPEC_VCVTPS2PH))] ++ "TARGET_F16C || TARGET_AVX512VL" ++ "vcvtps2ph\t{%2, %1, %0|%0, %1, %2}" ++ [(set_attr "type" "ssecvt") ++ (set_attr "prefix" "maybe_evex") ++ (set_attr "btver2_decode" "vector") ++ (set_attr "mode" "V8SF")]) ++ + (define_insn "avx512f_vcvtps2ph512" +- [(set (match_operand:V16HI 0 "nonimmediate_operand" "=vm") ++ [(set (match_operand:V16HI 0 "register_operand" "=v") + (unspec:V16HI + [(match_operand:V16SF 1 "register_operand" "v") + (match_operand:SI 2 "const_0_to_255_operand" "N")] +@@ -21389,6 +21401,18 @@ + (set_attr "prefix" "evex") + (set_attr "mode" "V16SF")]) + ++(define_insn "*avx512f_vcvtps2ph512" ++ [(set (match_operand:V16HI 0 "memory_operand" "=m") ++ (unspec:V16HI ++ [(match_operand:V16SF 1 "register_operand" "v") ++ (match_operand:SI 2 "const_0_to_255_operand" "N")] ++ UNSPEC_VCVTPS2PH))] ++ "TARGET_AVX512F" ++ "vcvtps2ph\t{%2, %1, %0|%0, %1, %2}" ++ [(set_attr "type" "ssecvt") ++ (set_attr "prefix" "evex") ++ (set_attr "mode" "V16SF")]) ++ + ;; For gather* insn patterns + (define_mode_iterator VEC_GATHER_MODE + [V2DI V2DF V4DI V4DF V4SI V4SF V8SI V8SF]) +diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md +index 4a1c9b080..27eb3430d 100644 +--- a/gcc/config/i386/subst.md ++++ b/gcc/config/i386/subst.md +@@ -75,6 +75,18 @@ + (match_operand:SUBST_V 2 "nonimm_or_0_operand" "0C") + (match_operand: 3 "register_operand" "Yk")))]) + ++(define_subst_attr "merge_mask_name" "merge_mask" "" "_merge_mask") ++(define_subst_attr "merge_mask_operand3" "merge_mask" "" "%{%3%}") ++(define_subst "merge_mask" ++ [(set (match_operand:SUBST_V 0) ++ (match_operand:SUBST_V 1))] ++ "TARGET_AVX512F" ++ [(set (match_dup 0) ++ (vec_merge:SUBST_V ++ (match_dup 1) ++ (match_dup 0) ++ (match_operand: 2 "register_operand" "Yk")))]) ++ + (define_subst_attr "mask_scalar_merge_name" "mask_scalar_merge" "" "_mask") + (define_subst_attr "mask_scalar_merge_operand3" "mask_scalar_merge" "" "%{%3%}") + (define_subst_attr "mask_scalar_merge_operand4" "mask_scalar_merge" "" "%{%4%}") +diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-pr95254.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-pr95254.c +new file mode 100644 +index 000000000..9e0da9473 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-pr95254.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mavx512f" } */ ++ ++#include ++extern __m256i res; ++void ++foo (__m512 a, __mmask16 m) ++{ ++ res = _mm512_maskz_cvtps_ph (m, a, 10); ++} ++ ++/* { dg-final { scan-assembler-not "vcvtps2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]\[^\n\]*res\[^\n\]*\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)"} } */ +diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c b/gcc/testsuite/gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c +new file mode 100644 +index 000000000..0c685ea66 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mavx512vl -mavx512f" } */ ++ ++#include ++extern __m128i res; ++void ++foo (__m256 a, __mmask8 m) ++{ ++ res = _mm256_maskz_cvtps_ph (m, a, 10); ++} ++ ++void ++foo1 (__m128 a, __mmask8 m) ++{ ++ res = _mm_maskz_cvtps_ph (m, a, 10); ++} ++ ++/* { dg-final { scan-assembler-not "vcvtps2ph\[ \\t\]+\[^\{\n\]*%\[xy\]mm\[0-9\]\[^\n\]*res\[^\n\]*\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)"} } */ +-- +2.33.0 + diff --git a/0096-Struct-reorg-Fix-the-use-of-as_a.patch b/0096-Struct-reorg-Fix-the-use-of-as_a.patch new file mode 100644 index 0000000000000000000000000000000000000000..77a8880c9db4779c4be4af4d3711cb57cd1f2c0d --- /dev/null +++ b/0096-Struct-reorg-Fix-the-use-of-as_a.patch @@ -0,0 +1,49 @@ +From 1ab2b199a30db4ec605581a5a23b5c258a127db6 Mon Sep 17 00:00:00 2001 +From: dingguangya +Date: Fri, 26 May 2023 09:27:38 +0800 +Subject: [PATCH 4/5] [Struct reorg] Fix the use of as_a + +The as_a function is an internal type conversion +function in gcc, which should be: gimple * ->gcond * when used, +so fix the problem with function usage at this. +--- + gcc/ipa-struct-reorg/ipa-struct-reorg.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +index 2cac340c7..b0e4624b2 100644 +--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c ++++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +@@ -6607,8 +6607,7 @@ ipa_struct_reorg::compress_candidate_with_check (gimple_stmt_iterator *gsi, + gimple_set_location (cond, UNKNOWN_LOCATION); + gsi_insert_before (gsi, cond, GSI_SAME_STMT); + +- gimple* cur_stmt = as_a (cond); +- edge e = split_block (cur_stmt->bb, cur_stmt); ++ edge e = split_block (cond->bb, cond); + basic_block split_src_bb = e->src; + basic_block split_dst_bb = e->dest; + +@@ -6847,8 +6846,7 @@ ipa_struct_reorg::decompress_candidate_with_check (gimple_stmt_iterator *gsi, + gsi_insert_before (gsi, cond, GSI_SAME_STMT); + + /* Split bb. */ +- gimple* cur_stmt = as_a (cond); +- edge e = split_block (cur_stmt->bb, cur_stmt); ++ edge e = split_block (cond->bb, cond); + basic_block split_src_bb = e->src; + basic_block split_dst_bb = e->dest; + +@@ -7133,8 +7131,7 @@ ipa_struct_reorg::rewrite_pointer_plus_integer (gimple *stmt, + gimple_set_location (cond, UNKNOWN_LOCATION); + gsi_insert_before (gsi, cond, GSI_SAME_STMT); + +- gimple *curr_stmt = as_a (cond); +- edge e = split_block (curr_stmt->bb, curr_stmt); ++ edge e = split_block (cond->bb, cond); + basic_block split_src_bb = e->src; + basic_block split_dst_bb = e->dest; + remove_edge_raw (e); +-- +2.33.0 + diff --git a/0097-libquadmath-Revert-Enable-libquadmath-on-kunpeng.patch b/0097-libquadmath-Revert-Enable-libquadmath-on-kunpeng.patch new file mode 100644 index 0000000000000000000000000000000000000000..4811c21d8e7d3a3fccca54b2184e455df090e92e --- /dev/null +++ b/0097-libquadmath-Revert-Enable-libquadmath-on-kunpeng.patch @@ -0,0 +1,474 @@ +From 95dc65ad458a6c781536e30e65fdeec42349a0c9 Mon Sep 17 00:00:00 2001 +From: eastb233 +Date: Wed, 31 May 2023 10:39:56 +0800 +Subject: [PATCH 1/3] [libquadmath] Revert "Enable libquadmath on kunpeng" + +This reverts commit 85740d3cc56fda699beae689b5d73233d16097af. + +Revert original libquadmath feature to refactor it. +--- + libquadmath/Makefile.in | 353 ++++++++++++++++++++-------------------- + libquadmath/quadmath.h | 6 +- + 2 files changed, 178 insertions(+), 181 deletions(-) + +diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in +index 66df9c922..8c0112122 100644 +--- a/libquadmath/Makefile.in ++++ b/libquadmath/Makefile.in +@@ -90,7 +90,7 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ +-#libquadmath_la_DEPENDENCIES = ++@BUILD_LIBQUADMATH_FALSE@libquadmath_la_DEPENDENCIES = + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ +@@ -147,68 +147,68 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \ + "$(DESTDIR)$(libsubincludedir)" + LTLIBRARIES = $(toolexeclib_LTLIBRARIES) + am__dirstamp = $(am__leading_dot)dirstamp +-am_libquadmath_la_OBJECTS = math/x2y2m1q.lo \ +- math/acoshq.lo math/fmodq.lo \ +- math/acosq.lo math/frexpq.lo \ +- math/rem_pio2q.lo math/asinhq.lo \ +- math/hypotq.lo math/remainderq.lo \ +- math/asinq.lo math/rintq.lo \ +- math/atan2q.lo math/isinfq.lo \ +- math/roundq.lo math/atanhq.lo \ +- math/isnanq.lo math/scalblnq.lo \ +- math/atanq.lo math/j0q.lo \ +- math/scalbnq.lo math/cbrtq.lo \ +- math/j1q.lo math/signbitq.lo \ +- math/ceilq.lo math/jnq.lo \ +- math/sincos_table.lo math/complex.lo \ +- math/ldexpq.lo math/sincosq.lo \ +- math/copysignq.lo math/lgammaq.lo \ +- math/sincosq_kernel.lo math/coshq.lo \ +- math/llroundq.lo math/sinhq.lo \ +- math/cosq.lo math/log10q.lo \ +- math/sinq.lo math/cosq_kernel.lo \ +- math/log1pq.lo math/sinq_kernel.lo \ +- math/erfq.lo math/logq.lo \ +- math/sqrtq.lo math/expm1q.lo \ +- math/lroundq.lo math/tanhq.lo \ +- math/expq.lo math/modfq.lo \ +- math/tanq.lo math/fabsq.lo \ +- math/nanq.lo math/tgammaq.lo \ +- math/finiteq.lo math/nextafterq.lo \ +- math/truncq.lo math/floorq.lo \ +- math/powq.lo math/fmaq.lo \ +- math/logbq.lo math/exp2q.lo \ +- math/issignalingq.lo \ +- math/lgammaq_neg.lo \ +- math/lgammaq_product.lo \ +- math/tanq_kernel.lo \ +- math/tgammaq_product.lo \ +- math/casinhq_kernel.lo math/cacoshq.lo \ +- math/cacosq.lo math/casinhq.lo \ +- math/casinq.lo math/catanhq.lo \ +- math/catanq.lo math/cimagq.lo \ +- math/conjq.lo math/cprojq.lo \ +- math/crealq.lo math/fdimq.lo \ +- math/fmaxq.lo math/fminq.lo \ +- math/ilogbq.lo math/llrintq.lo \ +- math/log2q.lo math/lrintq.lo \ +- math/nearbyintq.lo math/remquoq.lo \ +- math/ccoshq.lo math/cexpq.lo \ +- math/clog10q.lo math/clogq.lo \ +- math/csinq.lo math/csinhq.lo \ +- math/csqrtq.lo math/ctanq.lo \ +- math/ctanhq.lo printf/addmul_1.lo \ +- printf/add_n.lo printf/cmp.lo \ +- printf/divrem.lo printf/flt1282mpn.lo \ +- printf/fpioconst.lo printf/lshift.lo \ +- printf/mul_1.lo printf/mul_n.lo \ +- printf/mul.lo printf/printf_fphex.lo \ +- printf/printf_fp.lo \ +- printf/quadmath-printf.lo \ +- printf/rshift.lo printf/submul_1.lo \ +- printf/sub_n.lo strtod/strtoflt128.lo \ +- strtod/mpn2flt128.lo \ +- strtod/tens_in_limb.lo ++@BUILD_LIBQUADMATH_TRUE@am_libquadmath_la_OBJECTS = math/x2y2m1q.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/acoshq.lo math/fmodq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/acosq.lo math/frexpq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/rem_pio2q.lo math/asinhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/hypotq.lo math/remainderq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/asinq.lo math/rintq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/atan2q.lo math/isinfq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/roundq.lo math/atanhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/isnanq.lo math/scalblnq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/atanq.lo math/j0q.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/scalbnq.lo math/cbrtq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/j1q.lo math/signbitq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/ceilq.lo math/jnq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/sincos_table.lo math/complex.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/ldexpq.lo math/sincosq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/copysignq.lo math/lgammaq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/sincosq_kernel.lo math/coshq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/llroundq.lo math/sinhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/cosq.lo math/log10q.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/sinq.lo math/cosq_kernel.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/log1pq.lo math/sinq_kernel.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/erfq.lo math/logq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/sqrtq.lo math/expm1q.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/lroundq.lo math/tanhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/expq.lo math/modfq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/tanq.lo math/fabsq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/nanq.lo math/tgammaq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/finiteq.lo math/nextafterq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/truncq.lo math/floorq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/powq.lo math/fmaq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/logbq.lo math/exp2q.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/issignalingq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/lgammaq_neg.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/lgammaq_product.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/tanq_kernel.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/tgammaq_product.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/casinhq_kernel.lo math/cacoshq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/cacosq.lo math/casinhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/casinq.lo math/catanhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/catanq.lo math/cimagq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/conjq.lo math/cprojq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/crealq.lo math/fdimq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/fmaxq.lo math/fminq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/ilogbq.lo math/llrintq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/log2q.lo math/lrintq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/nearbyintq.lo math/remquoq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/ccoshq.lo math/cexpq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/clog10q.lo math/clogq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/csinq.lo math/csinhq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/csqrtq.lo math/ctanq.lo \ ++@BUILD_LIBQUADMATH_TRUE@ math/ctanhq.lo printf/addmul_1.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/add_n.lo printf/cmp.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/divrem.lo printf/flt1282mpn.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/fpioconst.lo printf/lshift.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/mul_1.lo printf/mul_n.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/mul.lo printf/printf_fphex.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/printf_fp.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/quadmath-printf.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/rshift.lo printf/submul_1.lo \ ++@BUILD_LIBQUADMATH_TRUE@ printf/sub_n.lo strtod/strtoflt128.lo \ ++@BUILD_LIBQUADMATH_TRUE@ strtod/mpn2flt128.lo \ ++@BUILD_LIBQUADMATH_TRUE@ strtod/tens_in_limb.lo + libquadmath_la_OBJECTS = $(am_libquadmath_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -218,8 +218,8 @@ libquadmath_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libquadmath_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +-am_libquadmath_la_rpath = -rpath \ +- $(toolexeclibdir) ++@BUILD_LIBQUADMATH_TRUE@am_libquadmath_la_rpath = -rpath \ ++@BUILD_LIBQUADMATH_TRUE@ $(toolexeclibdir) + AM_V_P = $(am__v_P_@AM_V@) + am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) + am__v_P_0 = false +@@ -337,7 +337,7 @@ CFLAGS = @CFLAGS@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ -D__float128="long double" ++DEFS = @DEFS@ + DEPDIR = @DEPDIR@ + DSYMUTIL = @DSYMUTIL@ + DUMPBIN = @DUMPBIN@ +@@ -409,7 +409,7 @@ datadir = @datadir@ + datarootdir = @datarootdir@ + docdir = @docdir@ + dvidir = @dvidir@ +-enable_shared = yes ++enable_shared = @enable_shared@ + enable_static = @enable_static@ + exec_prefix = @exec_prefix@ + get_gcc_base_ver = @get_gcc_base_ver@ +@@ -451,109 +451,109 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign info-in-builddir +-ACLOCAL_AMFLAGS = -I .. -I ../config +-AM_CPPFLAGS = -I $(top_srcdir)/../include +-AM_CFLAGS = $(XCFLAGS) +-gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) +-@LIBQUAD_USE_SYMVER_FALSE@version_arg = +-@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/quadmath.map +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,-M,quadmath.map-sun +-@LIBQUAD_USE_SYMVER_FALSE@version_dep = +-@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = $(srcdir)/quadmath.map +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = quadmath.map-sun +-toolexeclib_LTLIBRARIES = libquadmath.la +-libquadmath_la_LIBADD = +-libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ +- $(version_arg) $(lt_host_flags) -lm +- +-libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) +-nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include +-libquadmath_la_SOURCES = \ +- math/x2y2m1q.c math/acoshq.c math/fmodq.c \ +- math/acosq.c math/frexpq.c \ +- math/rem_pio2q.c math/asinhq.c math/hypotq.c math/remainderq.c \ +- math/asinq.c math/rintq.c math/atan2q.c math/isinfq.c \ +- math/roundq.c math/atanhq.c math/isnanq.c math/scalblnq.c math/atanq.c \ +- math/j0q.c math/scalbnq.c math/cbrtq.c math/j1q.c math/signbitq.c \ +- math/ceilq.c math/jnq.c math/sincos_table.c math/complex.c math/ldexpq.c \ +- math/sincosq.c math/copysignq.c math/lgammaq.c math/sincosq_kernel.c \ +- math/coshq.c math/llroundq.c math/sinhq.c math/cosq.c math/log10q.c \ +- math/sinq.c math/cosq_kernel.c math/log1pq.c math/sinq_kernel.c \ +- math/erfq.c math/logq.c math/sqrtq.c math/expm1q.c math/lroundq.c \ +- math/tanhq.c math/expq.c math/modfq.c math/tanq.c math/fabsq.c \ +- math/nanq.c math/tgammaq.c math/finiteq.c math/nextafterq.c \ +- math/truncq.c math/floorq.c math/powq.c math/fmaq.c math/logbq.c \ +- math/exp2q.c math/issignalingq.c math/lgammaq_neg.c math/lgammaq_product.c \ +- math/tanq_kernel.c math/tgammaq_product.c math/casinhq_kernel.c \ +- math/cacoshq.c math/cacosq.c math/casinhq.c math/casinq.c \ +- math/catanhq.c math/catanq.c math/cimagq.c math/conjq.c math/cprojq.c \ +- math/crealq.c math/fdimq.c math/fmaxq.c math/fminq.c math/ilogbq.c \ +- math/llrintq.c math/log2q.c math/lrintq.c math/nearbyintq.c math/remquoq.c \ +- math/ccoshq.c math/cexpq.c math/clog10q.c math/clogq.c math/csinq.c \ +- math/csinhq.c math/csqrtq.c math/ctanq.c math/ctanhq.c \ +- printf/addmul_1.c printf/add_n.c printf/cmp.c printf/divrem.c \ +- printf/flt1282mpn.c printf/fpioconst.c printf/lshift.c printf/mul_1.c \ +- printf/mul_n.c printf/mul.c printf/printf_fphex.c printf/printf_fp.c \ +- printf/quadmath-printf.c printf/rshift.c printf/submul_1.c printf/sub_n.c \ +- strtod/strtoflt128.c strtod/mpn2flt128.c strtod/tens_in_limb.c ++@BUILD_LIBQUADMATH_TRUE@ACLOCAL_AMFLAGS = -I .. -I ../config ++@BUILD_LIBQUADMATH_TRUE@AM_CPPFLAGS = -I $(top_srcdir)/../include ++@BUILD_LIBQUADMATH_TRUE@AM_CFLAGS = $(XCFLAGS) ++@BUILD_LIBQUADMATH_TRUE@gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_FALSE@version_arg = ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,--version-script=$(srcdir)/quadmath.map ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_arg = -Wl,-M,quadmath.map-sun ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_FALSE@version_dep = ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_GNU_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = $(srcdir)/quadmath.map ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@version_dep = quadmath.map-sun ++@BUILD_LIBQUADMATH_TRUE@toolexeclib_LTLIBRARIES = libquadmath.la ++@BUILD_LIBQUADMATH_TRUE@libquadmath_la_LIBADD = ++@BUILD_LIBQUADMATH_TRUE@libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ ++@BUILD_LIBQUADMATH_TRUE@ $(version_arg) $(lt_host_flags) -lm ++ ++@BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) ++@BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h ++@BUILD_LIBQUADMATH_TRUE@libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++@BUILD_LIBQUADMATH_TRUE@libquadmath_la_SOURCES = \ ++@BUILD_LIBQUADMATH_TRUE@ math/x2y2m1q.c math/acoshq.c math/fmodq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/acosq.c math/frexpq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/rem_pio2q.c math/asinhq.c math/hypotq.c math/remainderq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/asinq.c math/rintq.c math/atan2q.c math/isinfq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/roundq.c math/atanhq.c math/isnanq.c math/scalblnq.c math/atanq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/j0q.c math/scalbnq.c math/cbrtq.c math/j1q.c math/signbitq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/ceilq.c math/jnq.c math/sincos_table.c math/complex.c math/ldexpq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/sincosq.c math/copysignq.c math/lgammaq.c math/sincosq_kernel.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/coshq.c math/llroundq.c math/sinhq.c math/cosq.c math/log10q.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/sinq.c math/cosq_kernel.c math/log1pq.c math/sinq_kernel.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/erfq.c math/logq.c math/sqrtq.c math/expm1q.c math/lroundq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/tanhq.c math/expq.c math/modfq.c math/tanq.c math/fabsq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/nanq.c math/tgammaq.c math/finiteq.c math/nextafterq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/truncq.c math/floorq.c math/powq.c math/fmaq.c math/logbq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/exp2q.c math/issignalingq.c math/lgammaq_neg.c math/lgammaq_product.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/tanq_kernel.c math/tgammaq_product.c math/casinhq_kernel.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/cacoshq.c math/cacosq.c math/casinhq.c math/casinq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/catanhq.c math/catanq.c math/cimagq.c math/conjq.c math/cprojq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/crealq.c math/fdimq.c math/fmaxq.c math/fminq.c math/ilogbq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/llrintq.c math/log2q.c math/lrintq.c math/nearbyintq.c math/remquoq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/ccoshq.c math/cexpq.c math/clog10q.c math/clogq.c math/csinq.c \ ++@BUILD_LIBQUADMATH_TRUE@ math/csinhq.c math/csqrtq.c math/ctanq.c math/ctanhq.c \ ++@BUILD_LIBQUADMATH_TRUE@ printf/addmul_1.c printf/add_n.c printf/cmp.c printf/divrem.c \ ++@BUILD_LIBQUADMATH_TRUE@ printf/flt1282mpn.c printf/fpioconst.c printf/lshift.c printf/mul_1.c \ ++@BUILD_LIBQUADMATH_TRUE@ printf/mul_n.c printf/mul.c printf/printf_fphex.c printf/printf_fp.c \ ++@BUILD_LIBQUADMATH_TRUE@ printf/quadmath-printf.c printf/rshift.c printf/submul_1.c printf/sub_n.c \ ++@BUILD_LIBQUADMATH_TRUE@ strtod/strtoflt128.c strtod/mpn2flt128.c strtod/tens_in_limb.c + + + # Work around what appears to be a GNU make bug handling MAKEFLAGS + # values defined in terms of make variables, as is the case for CC and + # friends when we are called from the top level Makefile. +-AM_MAKEFLAGS = \ +- "AR_FLAGS=$(AR_FLAGS)" \ +- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ +- "CFLAGS=$(CFLAGS)" \ +- "CXXFLAGS=$(CXXFLAGS)" \ +- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ +- "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ +- "INSTALL=$(INSTALL)" \ +- "INSTALL_DATA=$(INSTALL_DATA)" \ +- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ +- "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ +- "JC1FLAGS=$(JC1FLAGS)" \ +- "LDFLAGS=$(LDFLAGS)" \ +- "LIBCFLAGS=$(LIBCFLAGS)" \ +- "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ +- "MAKE=$(MAKE)" \ +- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ +- "PICFLAG=$(PICFLAG)" \ +- "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ +- "SHELL=$(SHELL)" \ +- "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ +- "exec_prefix=$(exec_prefix)" \ +- "infodir=$(infodir)" \ +- "libdir=$(libdir)" \ +- "prefix=$(prefix)" \ +- "includedir=$(includedir)" \ +- "AR=$(AR)" \ +- "AS=$(AS)" \ +- "CC=$(CC)" \ +- "CXX=$(CXX)" \ +- "LD=$(LD)" \ +- "LIBCFLAGS=$(LIBCFLAGS)" \ +- "NM=$(NM)" \ +- "PICFLAG=$(PICFLAG)" \ +- "RANLIB=$(RANLIB)" \ +- "DESTDIR=$(DESTDIR)" ++@BUILD_LIBQUADMATH_TRUE@AM_MAKEFLAGS = \ ++@BUILD_LIBQUADMATH_TRUE@ "AR_FLAGS=$(AR_FLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CFLAGS=$(CFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CXXFLAGS=$(CXXFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ ++@BUILD_LIBQUADMATH_TRUE@ "INSTALL=$(INSTALL)" \ ++@BUILD_LIBQUADMATH_TRUE@ "INSTALL_DATA=$(INSTALL_DATA)" \ ++@BUILD_LIBQUADMATH_TRUE@ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ ++@BUILD_LIBQUADMATH_TRUE@ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ ++@BUILD_LIBQUADMATH_TRUE@ "JC1FLAGS=$(JC1FLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "LDFLAGS=$(LDFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "LIBCFLAGS=$(LIBCFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ ++@BUILD_LIBQUADMATH_TRUE@ "MAKE=$(MAKE)" \ ++@BUILD_LIBQUADMATH_TRUE@ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "PICFLAG=$(PICFLAG)" \ ++@BUILD_LIBQUADMATH_TRUE@ "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ ++@BUILD_LIBQUADMATH_TRUE@ "SHELL=$(SHELL)" \ ++@BUILD_LIBQUADMATH_TRUE@ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "exec_prefix=$(exec_prefix)" \ ++@BUILD_LIBQUADMATH_TRUE@ "infodir=$(infodir)" \ ++@BUILD_LIBQUADMATH_TRUE@ "libdir=$(libdir)" \ ++@BUILD_LIBQUADMATH_TRUE@ "prefix=$(prefix)" \ ++@BUILD_LIBQUADMATH_TRUE@ "includedir=$(includedir)" \ ++@BUILD_LIBQUADMATH_TRUE@ "AR=$(AR)" \ ++@BUILD_LIBQUADMATH_TRUE@ "AS=$(AS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CC=$(CC)" \ ++@BUILD_LIBQUADMATH_TRUE@ "CXX=$(CXX)" \ ++@BUILD_LIBQUADMATH_TRUE@ "LD=$(LD)" \ ++@BUILD_LIBQUADMATH_TRUE@ "LIBCFLAGS=$(LIBCFLAGS)" \ ++@BUILD_LIBQUADMATH_TRUE@ "NM=$(NM)" \ ++@BUILD_LIBQUADMATH_TRUE@ "PICFLAG=$(PICFLAG)" \ ++@BUILD_LIBQUADMATH_TRUE@ "RANLIB=$(RANLIB)" \ ++@BUILD_LIBQUADMATH_TRUE@ "DESTDIR=$(DESTDIR)" + + + # Subdir rules rely on $(FLAGS_TO_PASS) +-FLAGS_TO_PASS = $(AM_MAKEFLAGS) +-MAKEOVERRIDES = +-@GENINSRC_FALSE@STAMP_GENINSRC = ++@BUILD_LIBQUADMATH_TRUE@FLAGS_TO_PASS = $(AM_MAKEFLAGS) ++@BUILD_LIBQUADMATH_TRUE@MAKEOVERRIDES = ++@BUILD_LIBQUADMATH_TRUE@@GENINSRC_FALSE@STAMP_GENINSRC = + + # AM_CONDITIONAL on configure option --generated-files-in-srcdir +-@GENINSRC_TRUE@STAMP_GENINSRC = stamp-geninsrc +-ALL_LOCAL_DEPS = $(STAMP_GENINSRC) +-@BUILD_INFO_FALSE@STAMP_BUILD_INFO = ++@BUILD_LIBQUADMATH_TRUE@@GENINSRC_TRUE@STAMP_GENINSRC = stamp-geninsrc ++@BUILD_LIBQUADMATH_TRUE@ALL_LOCAL_DEPS = $(STAMP_GENINSRC) ++@BUILD_INFO_FALSE@@BUILD_LIBQUADMATH_TRUE@STAMP_BUILD_INFO = + + # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO]) +-@BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info +-CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) +-MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info ++@BUILD_INFO_TRUE@@BUILD_LIBQUADMATH_TRUE@STAMP_BUILD_INFO = stamp-build-info ++@BUILD_LIBQUADMATH_TRUE@CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) ++@BUILD_LIBQUADMATH_TRUE@MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info + + # Automake Documentation: + # If your package has Texinfo files in many directories, you can use the +@@ -564,8 +564,8 @@ TEXINFO_TEX = ../gcc/doc/include/texinfo.tex + + # Defines info, dvi, pdf and html targets + MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include +-info_TEXINFOS = +-info_TEXINFOS = libquadmath.texi ++@BUILD_LIBQUADMATH_FALSE@info_TEXINFOS = ++@BUILD_LIBQUADMATH_TRUE@info_TEXINFOS = libquadmath.texi + libquadmath_TEXINFOS = libquadmath-vers.texi + MULTISRCTOP = + MULTIBUILDTOP = +@@ -1187,7 +1187,6 @@ distclean-tags: + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + check-am: all-am + check: check-am +-#all-local + all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(HEADERS) config.h \ + all-local + installdirs: +@@ -1426,22 +1425,22 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + + .PRECIOUS: Makefile + +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@quadmath.map-sun : $(srcdir)/quadmath.map \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(libquadmath_la_OBJECTS) $(libquadmath_la_LIBADD) +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(srcdir)/quadmath.map \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ `echo $(libquadmath_la_OBJECTS) $(libquadmath_la_LIBADD) | \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ +-@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1) +- +-stamp-geninsrc: libquadmath.info +- cp -p $(top_builddir)/libquadmath.info $(srcdir)/libquadmath.info +- @touch $@ +- +-stamp-build-info: libquadmath.texi $(libquadmath_TEXINFOS) +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libquadmath.info $(srcdir)/libquadmath.texi +- @touch $@ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@quadmath.map-sun : $(srcdir)/quadmath.map \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(libquadmath_la_OBJECTS) $(libquadmath_la_LIBADD) ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ $(srcdir)/quadmath.map \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ `echo $(libquadmath_la_OBJECTS) $(libquadmath_la_LIBADD) | \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ ++@BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1) ++ ++@BUILD_LIBQUADMATH_TRUE@stamp-geninsrc: libquadmath.info ++@BUILD_LIBQUADMATH_TRUE@ cp -p $(top_builddir)/libquadmath.info $(srcdir)/libquadmath.info ++@BUILD_LIBQUADMATH_TRUE@ @touch $@ ++ ++@BUILD_LIBQUADMATH_TRUE@stamp-build-info: libquadmath.texi $(libquadmath_TEXINFOS) ++@BUILD_LIBQUADMATH_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libquadmath.info $(srcdir)/libquadmath.texi ++@BUILD_LIBQUADMATH_TRUE@ @touch $@ + + all-local: $(ALL_LOCAL_DEPS) + +diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h +index faa5977cb..81eb957d2 100644 +--- a/libquadmath/quadmath.h ++++ b/libquadmath/quadmath.h +@@ -27,9 +27,6 @@ Boston, MA 02110-1301, USA. */ + extern "C" { + #endif + +-#ifdef AARCH64_QUADMATH +-typedef long double __float128; +-#endif + /* Define the complex type corresponding to __float128 + ("_Complex __float128" is not allowed) */ + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) +@@ -163,9 +160,10 @@ extern int quadmath_snprintf (char *str, size_t size, + #define FLT128_MAX_10_EXP 4932 + + ++#define HUGE_VALQ __builtin_huge_valq() + /* The following alternative is valid, but brings the warning: + (floating constant exceeds range of ‘__float128’) */ +- #define HUGE_VALQ (__extension__ 0x1.0p32767Q) ++/* #define HUGE_VALQ (__extension__ 0x1.0p32767Q) */ + + #define M_Eq 2.718281828459045235360287471352662498Q /* e */ + #define M_LOG2Eq 1.442695040888963407359924681001892137Q /* log_2 e */ +-- +2.33.0 + diff --git a/0098-libquadmath-refactor-Enable-libquadmath-on-kunpeng.patch b/0098-libquadmath-refactor-Enable-libquadmath-on-kunpeng.patch new file mode 100644 index 0000000000000000000000000000000000000000..1ddcef5e1317ab18cd54073a0be127579358c36f --- /dev/null +++ b/0098-libquadmath-refactor-Enable-libquadmath-on-kunpeng.patch @@ -0,0 +1,197 @@ +From 60e80a17a7019026dc7e2da9dc597c9fdf426e33 Mon Sep 17 00:00:00 2001 +From: eastb233 +Date: Wed, 31 May 2023 10:48:47 +0800 +Subject: [PATCH 2/3] [libquadmath][refactor] Enable libquadmath on kunpeng + +This enable libquadmath on kunpeng platform to convenient +users that migrating from x86 platform. libquadmath uses "__float128" +as quad precision floating point type and with math functions with "q" +suffix like "cosq". For those who do not need to adapt to x86 platform, +you can use "long double" as quad precision floating point type and math +functions with "l" suffix like "cosl" in libm for quad precision math. +--- + libquadmath/Makefile.am | 4 ++++ + libquadmath/Makefile.in | 3 ++- + libquadmath/configure | 28 ++++++++++++++++++++++++++-- + libquadmath/configure.ac | 7 +++++++ + libquadmath/quadmath.h | 13 +++++++++++-- + 5 files changed, 50 insertions(+), 5 deletions(-) + +diff --git a/libquadmath/Makefile.am b/libquadmath/Makefile.am +index 35dffb46f..bf0398d9c 100644 +--- a/libquadmath/Makefile.am ++++ b/libquadmath/Makefile.am +@@ -2,6 +2,10 @@ + + AUTOMAKE_OPTIONS = foreign info-in-builddir + ++if ARCH_AARCH64 ++DEFS += -D__float128="long double" ++endif ++ + ## Skip over everything if the quadlib is not available: + if BUILD_LIBQUADMATH + ACLOCAL_AMFLAGS = -I .. -I ../config +diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in +index 8c0112122..449cc8a06 100644 +--- a/libquadmath/Makefile.in ++++ b/libquadmath/Makefile.in +@@ -90,6 +90,7 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ ++@ARCH_AARCH64_TRUE@am__append_1 = -D__float128="long double" + @BUILD_LIBQUADMATH_FALSE@libquadmath_la_DEPENDENCIES = + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -337,7 +338,7 @@ CFLAGS = @CFLAGS@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ + CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ ++DEFS = @DEFS@ $(am__append_1) + DEPDIR = @DEPDIR@ + DSYMUTIL = @DSYMUTIL@ + DUMPBIN = @DUMPBIN@ +diff --git a/libquadmath/configure b/libquadmath/configure +index b5b212c06..da41959ee 100644 +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -633,6 +633,8 @@ am__EXEEXT_TRUE + LTLIBOBJS + LIBOBJS + get_gcc_base_ver ++ARCH_AARCH64_FALSE ++ARCH_AARCH64_TRUE + GENINSRC_FALSE + GENINSRC_TRUE + XCFLAGS +@@ -10816,7 +10818,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10819 "configure" ++#line 10821 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10922,7 +10924,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10925 "configure" ++#line 10927 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12715,6 +12717,11 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if defined(__aarch64__) ++ typedef long double __float128; ++ #define __builtin_huge_valq() (__extension__ 0x1.0p32767Q) ++ #endif ++ + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) + typedef _Complex float __attribute__((mode(TC))) __complex128; + #else +@@ -12766,6 +12773,11 @@ fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if defined(__aarch64__) ++ typedef long double __float128; ++ #define __builtin_huge_valq() (__extension__ 0x1.0p32767Q) ++ #endif ++ + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) + typedef _Complex float __attribute__((mode(TC))) __complex128; + #else +@@ -13224,6 +13236,14 @@ else + GENINSRC_FALSE= + fi + ++ if expr "$target_cpu" : "aarch64.*" > /dev/null; then ++ ARCH_AARCH64_TRUE= ++ ARCH_AARCH64_FALSE='#' ++else ++ ARCH_AARCH64_TRUE='#' ++ ARCH_AARCH64_FALSE= ++fi ++ + + # Determine what GCC version number to use in filesystem paths. + +@@ -13407,6 +13427,10 @@ if test -z "${GENINSRC_TRUE}" && test -z "${GENINSRC_FALSE}"; then + as_fn_error $? "conditional \"GENINSRC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${ARCH_AARCH64_TRUE}" && test -z "${ARCH_AARCH64_FALSE}"; then ++ as_fn_error $? "conditional \"ARCH_AARCH64\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +diff --git a/libquadmath/configure.ac b/libquadmath/configure.ac +index f9d745e60..0b8511f04 100644 +--- a/libquadmath/configure.ac ++++ b/libquadmath/configure.ac +@@ -218,6 +218,11 @@ AM_CONDITIONAL(LIBQUAD_USE_SYMVER_SUN, [test "x$quadmath_use_symver" = xsun]) + + AC_CACHE_CHECK([whether __float128 is supported], [libquad_cv_have_float128], + [GCC_TRY_COMPILE_OR_LINK([ ++ #if defined(__aarch64__) ++ typedef long double __float128; ++ #define __builtin_huge_valq() (__extension__ 0x1.0p32767Q) ++ #endif ++ + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) + typedef _Complex float __attribute__((mode(TC))) __complex128; + #else +@@ -380,6 +385,8 @@ AS_HELP_STRING([--enable-generated-files-in-srcdir], + [enable_generated_files_in_srcdir=no]) + AC_MSG_RESULT($enable_generated_files_in_srcdir) + AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes) ++AM_CONDITIONAL(ARCH_AARCH64, ++ [expr "$target_cpu" : "aarch64.*" > /dev/null]) + + # Determine what GCC version number to use in filesystem paths. + GCC_BASE_VER +diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h +index 81eb957d2..bb1b49df6 100644 +--- a/libquadmath/quadmath.h ++++ b/libquadmath/quadmath.h +@@ -27,6 +27,12 @@ Boston, MA 02110-1301, USA. */ + extern "C" { + #endif + ++#if defined(__aarch64__) ++#ifndef __float128 ++typedef long double __float128; ++#endif ++#endif ++ + /* Define the complex type corresponding to __float128 + ("_Complex __float128" is not allowed) */ + #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__) +@@ -160,10 +166,13 @@ extern int quadmath_snprintf (char *str, size_t size, + #define FLT128_MAX_10_EXP 4932 + + +-#define HUGE_VALQ __builtin_huge_valq() ++#if defined(__aarch64__) + /* The following alternative is valid, but brings the warning: + (floating constant exceeds range of ‘__float128’) */ +-/* #define HUGE_VALQ (__extension__ 0x1.0p32767Q) */ ++# define HUGE_VALQ (__extension__ 0x1.0p32767Q) ++#else ++# define HUGE_VALQ __builtin_huge_valq() ++#endif + + #define M_Eq 2.718281828459045235360287471352662498Q /* e */ + #define M_LOG2Eq 1.442695040888963407359924681001892137Q /* log_2 e */ +-- +2.33.0 + diff --git a/0099-Struct-Reorg-Add-escape-propagate-on-external-functi.patch b/0099-Struct-Reorg-Add-escape-propagate-on-external-functi.patch new file mode 100644 index 0000000000000000000000000000000000000000..db9038efb4f0e0bc5916e53cbad137e99147002b --- /dev/null +++ b/0099-Struct-Reorg-Add-escape-propagate-on-external-functi.patch @@ -0,0 +1,258 @@ +From c6370dc949c39319ef1c31d0b42efc041d27379a Mon Sep 17 00:00:00 2001 +From: huang-xiaoquan +Date: Thu, 8 Jun 2023 11:37:09 +0800 +Subject: [PATCH] [Struct Reorg] Add escape propagate on external functions + using type + +External functions may use members of members through structure pointers. +Therefore, escape propagation of member types of types used by external +functions is added. +--- + gcc/ipa-struct-reorg/ipa-struct-reorg.c | 71 +++++++++++++++++-- + gcc/testsuite/gcc.dg/struct/dfe_extr_claw.c | 7 ++ + .../gcc.dg/struct/rf_external_func_types.c | 69 ++++++++++++++++++ + 3 files changed, 140 insertions(+), 7 deletions(-) + create mode 100644 gcc/testsuite/gcc.dg/struct/rf_external_func_types.c + +diff --git a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +index 7de4fee0e..367bcf210 100644 +--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c ++++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +@@ -1412,6 +1412,7 @@ public: + srglobal globals; + srfunction *current_function; + hash_set safe_functions; ++ auto_vec ext_func_types; + + bool done_recording; + +@@ -1426,6 +1427,7 @@ public: + void propagate_escape (void); + void propagate_escape_via_original (void); + void propagate_escape_via_empty_with_no_original (void); ++ void propagate_escape_via_ext_func_types (void); + void analyze_types (void); + void clear_visited (void); + bool create_new_types (void); +@@ -3131,7 +3133,14 @@ ipa_struct_reorg::record_type (tree type) + return NULL; + + if (dump_file && (dump_flags & TDF_DETAILS)) +- fprintf (dump_file, "Recording new type: %u.\n", typeuid); ++ { ++ fprintf (dump_file, "Recording new type: %u.\n", typeuid); ++ const char *type_name = get_type_name (type); ++ if (type_name == NULL) ++ fprintf (dump_file, "Recording new type NULL name\n"); ++ else ++ fprintf (dump_file, "Recording new type name: %s.\n", type_name); ++ } + + type1 = new srtype (type); + types.safe_push (type1); +@@ -4478,6 +4487,18 @@ ipa_struct_reorg::maybe_record_call (cgraph_node *node, gcall *stmt) + gimple_call_arg (stmt, i)); + if (d) + d->type->mark_escape (escapes, stmt); ++ ++ if (escapes == escape_external_function ++ && !gimple_call_builtin_p (stmt, BUILT_IN_MEMSET)) ++ { ++ if (dump_file && (dump_flags & TDF_DETAILS)) ++ { ++ fprintf (dump_file, "escape_external_function: "); ++ print_gimple_stmt (dump_file, stmt, 0); ++ } ++ if (d) ++ ext_func_types.safe_push (d->type); ++ } + } + return; + } +@@ -5672,6 +5693,35 @@ ipa_struct_reorg::propagate_escape_via_empty_with_no_original (void) + } + } + ++/* Escape propagation is performed on types that escape through external ++ functions. */ ++ ++void ++ipa_struct_reorg::propagate_escape_via_ext_func_types (void) ++{ ++ if (dump_file && (dump_flags & TDF_DETAILS)) ++ fprintf (dump_file, "\n propagate_escape_via_ext_func_types: \n\n"); ++ unsigned i = 0; ++ hash_set visited_types; ++ while (i < ext_func_types.length ()) ++ { ++ visited_types.add (ext_func_types[i]); ++ unsigned j = 0; ++ srfield * field; ++ FOR_EACH_VEC_ELT (ext_func_types[i]->fields, j, field) ++ { ++ if (field->type) ++ { ++ if (!field->type->has_escaped ()) ++ field->type->mark_escape (escape_dependent_type_escapes, NULL); ++ if (!visited_types.contains (field->type)) ++ ext_func_types.safe_push (field->type); ++ } ++ } ++ i++; ++ } ++} ++ + /* Prune the escaped types and their decls from what was recorded. */ + + void +@@ -5689,6 +5739,7 @@ ipa_struct_reorg::prune_escaped_types (void) + { + propagate_escape_via_original (); + propagate_escape_via_empty_with_no_original (); ++ propagate_escape_via_ext_func_types (); + } + + if (dump_file && (dump_flags & TDF_DETAILS)) +@@ -8242,8 +8293,9 @@ ipa_struct_reorg::rewrite_functions (void) + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "\nNo rewrite:\n"); +- dump_function_to_file (current_function_decl, dump_file, +- dump_flags | TDF_VOPS); ++ if (current_function_decl) ++ dump_function_to_file (current_function_decl, dump_file, ++ dump_flags | TDF_VOPS); + } + pop_cfun (); + } +@@ -8278,8 +8330,9 @@ ipa_struct_reorg::rewrite_functions (void) + { + fprintf (dump_file, "==== Before create decls: %dth_%s ====\n\n", + i, f->node->name ()); +- dump_function_to_file (current_function_decl, dump_file, +- dump_flags | TDF_VOPS); ++ if (current_function_decl) ++ dump_function_to_file (current_function_decl, dump_file, ++ dump_flags | TDF_VOPS); + } + pop_cfun (); + } +@@ -8313,8 +8366,9 @@ ipa_struct_reorg::rewrite_functions (void) + { + fprintf (dump_file, "\nBefore rewrite: %dth_%s\n", + i, f->node->name ()); +- dump_function_to_file (current_function_decl, dump_file, +- dump_flags | TDF_VOPS); ++ if (current_function_decl) ++ dump_function_to_file (current_function_decl, dump_file, ++ dump_flags | TDF_VOPS); + fprintf (dump_file, "\n======== Start to rewrite: %dth_%s ========\n", + i, f->node->name ()); + } +@@ -8659,6 +8713,9 @@ ipa_struct_reorg::execute (unsigned int opt) + { + unsigned int ret = 0; + ++ if (dump_file) ++ fprintf (dump_file, "\n\n====== ipa_struct_reorg level %d ======\n\n", opt); ++ + if (opt != COMPLETE_STRUCT_RELAYOUT) + { + current_layout_opt_level = opt; +diff --git a/gcc/testsuite/gcc.dg/struct/dfe_extr_claw.c b/gcc/testsuite/gcc.dg/struct/dfe_extr_claw.c +index e56bf467b..f9e2cf471 100644 +--- a/gcc/testsuite/gcc.dg/struct/dfe_extr_claw.c ++++ b/gcc/testsuite/gcc.dg/struct/dfe_extr_claw.c +@@ -42,6 +42,13 @@ int WS_APPL_NAME_PACKED; + int claw_send_control (struct net_device*, int, int, int, int, int, int); + int setup; + ++__attribute__((noinline)) int ++claw_send_control (struct net_device* net, int a, int b, int c, int d, int e, ++ int f) ++{ ++ return net->ml_priv->system_validate_comp + a + b + c + d + f; ++} ++ + __attribute__((used)) static int + claw_snd_conn_req (struct net_device *dev, __u8 link) + { +diff --git a/gcc/testsuite/gcc.dg/struct/rf_external_func_types.c b/gcc/testsuite/gcc.dg/struct/rf_external_func_types.c +new file mode 100644 +index 000000000..2a9bea783 +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/struct/rf_external_func_types.c +@@ -0,0 +1,69 @@ ++/* { dg-do compile } */ ++/* { dg-additional-options "-shared" } */ ++ ++#include ++#include ++ ++typedef struct node node_t; ++typedef struct node *node_p; ++ ++typedef struct arc arc_t; ++typedef struct arc *arc_p; ++ ++typedef struct network ++{ ++ int x; ++ arc_p arcs, sorted_arcs; ++ node_p nodes, stop_nodes; ++} network_t; ++ ++struct node ++{ ++ int64_t potential; ++ int orientation; ++ node_p child; ++ node_p pred; ++ node_p sibling; ++ node_p sibling_prev; ++ arc_p basic_arc; ++ arc_p firstout; ++ arc_p firstin; ++ arc_p arc_tmp; ++ int64_t flow; ++ int64_t depth; ++ int number; ++ int time; ++}; ++ ++struct arc ++{ ++ int id; ++ int64_t cost; ++ node_p tail; ++ node_p head; ++ short ident; ++ arc_p nextout; ++ arc_p nextin; ++ int64_t flow; ++ int64_t org_cost; ++}; ++ ++extern int bcf_sr_add_reader (network_t *); ++extern int bcf_hdr_dup (arc_p); ++ ++int ++test () ++{ ++ network_t *net = (network_t *) calloc (1, 20); ++ ++ if (!bcf_sr_add_reader(net)) ++ printf("error"); ++ arc_p arc = net->nodes->basic_arc; ++ if(!bcf_hdr_dup(arc)) ++ { ++ return -1; ++ } ++ return 0; ++} ++ ++/* { dg-final { scan-ipa-dump "No structures to transform." "struct_reorg" } } */ +\ No newline at end of file +-- +2.33.0 + diff --git a/gcc.spec b/gcc.spec index bb644a7896ec40ecfaee83cfb1d37e175a68605c..a40007de70d73161d8e0b53100b86097a62dcbc6 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 23 +Release: 24 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -197,6 +197,16 @@ Patch86: 0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch Patch87: 0087-Backport-tree-optimization-97238-fix-typo-causing-IC.patch Patch88: 0088-Backport-fix-typo-causing-ICE.patch Patch89: 0089-To-resolve-the-SPEC-.548-fluctuation-problem-revert-.patch +Patch90: 0090-State-sysroot-option-as-validated-once-processed.patch +Patch91: 0091-bogus-Wstringop-overflow-with-VLA-of-elements-larger.patch +Patch92: 0092-phiopt2-Add-option-to-control-the-simplify.patch +Patch93: 0093-gimple-Factor-the-code-to-avoid-depending-auto-featu.patch +Patch94: 0094-StructReorg-Fix-escape_cast_another_ptr-check-bug.patch +Patch95: 0095-Backport-Fix-zero-masking-for-vcvtps2ph-when-dest-op.patch +Patch96: 0096-Struct-reorg-Fix-the-use-of-as_a.patch +Patch97: 0097-libquadmath-Revert-Enable-libquadmath-on-kunpeng.patch +Patch98: 0098-libquadmath-refactor-Enable-libquadmath-on-kunpeng.patch +Patch99: 0099-Struct-Reorg-Add-escape-propagate-on-external-functi.patch %global gcc_target_platform %{_arch}-linux-gnu @@ -739,6 +749,16 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch87 -p1 %patch88 -p1 %patch89 -p1 +%patch90 -p1 +%patch91 -p1 +%patch92 -p1 +%patch93 -p1 +%patch94 -p1 +%patch95 -p1 +%patch96 -p1 +%patch97 -p1 +%patch98 -p1 +%patch99 -p1 %build @@ -2762,6 +2782,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Tue Jun 13 2023 Wang Ding - 10.3.1-24 +- Type:Sync +- ID:NA +- SUG:NA +- DESC:Sync patch from src-openeuler/openEuler-22.03-LTS-SP2 + * Wed Jun 07 2023 Zhao Shujian - 10.3.1-23 - Type:Spec - ID:NA