[llvm] [SystemZ][z/OS] TXT records in the GOFF reader (PR #87648)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 12:44:14 PDT 2024
================
@@ -502,3 +502,100 @@ TEST(GOFFObjectFileTest, InvalidERSymbolType) {
FailedWithMessage("ESD record 1 has unknown Executable type 0x03"));
}
}
+
+TEST(GOFFObjectFileTest, TXTConstruct) {
+ char GOFFData[GOFF::RecordLength * 6] = {};
+
+ // HDR record.
+ GOFFData[0] = 0x03;
+ GOFFData[1] = 0xF0;
----------------
mstorsjo wrote:
This causes lots of warnings when compiled with GCC, like these:
```
../unittests/Object/GOFFObjectFileTest.cpp:511:17: warning: overflow in conversion from ‘int’ to ‘char’ changes value from ‘240’ to ‘'\37777777760'’ [-Woverflow]
511 | GOFFData[1] = 0xF0;
| ^~~~
```
https://github.com/llvm/llvm-project/pull/87648
More information about the llvm-commits
mailing list