summaryrefslogtreecommitdiff
path: root/gcc48-pr78796.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 14:23:42 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 14:23:42 +0000
commit82711f6567ef069eebb942e382e2c3fa61fbf538 (patch)
tree22200b7326b32ca672ffb6e4ce6d19a09dc476e5 /gcc48-pr78796.patch
parent5d624aa0d36abe76a344f0593eae5cf36d083b15 (diff)
automatic import of compat-libgfortran-48openeuler24.03_LTSopeneuler23.09
Diffstat (limited to 'gcc48-pr78796.patch')
-rw-r--r--gcc48-pr78796.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/gcc48-pr78796.patch b/gcc48-pr78796.patch
new file mode 100644
index 0000000..6afd47a
--- /dev/null
+++ b/gcc48-pr78796.patch
@@ -0,0 +1,56 @@
+2016-12-14 Wilco Dijkstra <wdijkstr@arm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78796
+ * config/aarch64/aarch64.c (aarch64_classify_symbol): Merge large
+ model checks into switch.
+
+ * gcc.dg/tls/pr78796.c: New test.
+
+--- gcc/config/aarch64/aarch64.c (revision 243645)
++++ gcc/config/aarch64/aarch64.c (revision 243646)
+@@ -4986,6 +4986,9 @@ aarch64_classify_symbol (rtx x,
+ switch (aarch64_cmodel)
+ {
+ case AARCH64_CMODEL_LARGE:
++ if (aarch64_tls_symbol_p (x))
++ return aarch64_classify_tls_symbol (x);
++
+ return SYMBOL_FORCE_TO_MEM;
+
+ case AARCH64_CMODEL_TINY:
+--- gcc/testsuite/gcc.dg/tls/pr78796.c (nonexistent)
++++ gcc/testsuite/gcc.dg/tls/pr78796.c (revision 243646)
+@@ -0,0 +1,32 @@
++/* PR target/78796 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */
++/* { dg-require-effective-target tls } */
++
++struct S { int a, b, c, d, e; };
++struct S t;
++__thread struct S s;
++
++__attribute__((used, noinline, noclone)) void
++foo (int *x, int *y)
++{
++ asm volatile ("" : : "g" (x), "g" (y) : "memory");
++ if (*x != 1 || *y != 2)
++ __builtin_abort ();
++}
++
++__attribute__((used, noinline, noclone)) void
++bar (void)
++{
++ foo (&t.c, &s.c);
++}
++
++int
++main ()
++{
++ t.c = 1;
++ s.c = 2;
++ bar ();
++ return 0;
++}