a203640
On s390, GCC does not like the string initialization in this case.  When
a203640
ValueToWrite is initialized this way, GCC tries to copy the entire string
a203640
into an ACPI_OBJECT instead of just the pointer (see the use in the call
a203640
to memcpy()).  So, move the init so GCC recognizes that ValueToWrite is
a203640
only a pointer, and not a whole string that needs to be moved.
a203640
a203640
diff -Naur acpica-unix2-20200214.orig/source/components/debugger/dbtest.c acpica-unix2-20200214/source/components/debugger/dbtest.c
a203640
--- acpica-unix2-20200214.orig/source/components/debugger/dbtest.c	2020-02-14 10:33:54.000000000 -0700
a203640
+++ acpica-unix2-20200214/source/components/debugger/dbtest.c	2020-02-25 10:50:42.793372070 -0700
a203640
@@ -719,9 +719,10 @@
a203640
     ACPI_OBJECT             *Temp1 = NULL;
a203640
     ACPI_OBJECT             *Temp2 = NULL;
a203640
     ACPI_OBJECT             *Temp3 = NULL;
a203640
-    char                    *ValueToWrite = "Test String from AML Debugger";
a203640
+    char                    *ValueToWrite = NULL;
a203640
     ACPI_OBJECT             WriteValue;
a203640
     ACPI_STATUS             Status;
a203640
+    const char              *TestStr = "Test String from AML Debugger";
a203640
 
a203640
 
a203640
     /* Read the original value */
a203640
@@ -737,6 +738,9 @@
a203640
 
a203640
     /* Write a new value */
a203640
 
a203640
+    ValueToWrite = AcpiOsAllocateZeroed(strlen(TestStr)+1);
cd3d796
+    strncpy(ValueToWrite, TestStr, strlen(TestStr)+1);
a203640
+
a203640
     WriteValue.Type = ACPI_TYPE_STRING;
a203640
     WriteValue.String.Length = strlen (ValueToWrite);
a203640
     WriteValue.String.Pointer = ValueToWrite;
a203640
@@ -790,6 +794,7 @@
a203640
     if (Temp1) {AcpiOsFree (Temp1);}
a203640
     if (Temp2) {AcpiOsFree (Temp2);}
a203640
     if (Temp3) {AcpiOsFree (Temp3);}
a203640
+    if (ValueToWrite) {AcpiOsFree (ValueToWrite);}
a203640
     return (Status);
a203640
 }
a203640