diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2020-06-29 14:42:13 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:15:25 -0300 |
commit | bdb8680a838e122c3e8aa8b7c52e8996dacadb1c (patch) | |
tree | b6d95a553590a5eada56a00ef9a6b2fc893062fd | |
parent | 2dfe59a7b73edeb08e971a8f30dceeb37436b501 (diff) | |
download | gcc-bdb8680a838e122c3e8aa8b7c52e8996dacadb1c.zip gcc-bdb8680a838e122c3e8aa8b7c52e8996dacadb1c.tar.gz gcc-bdb8680a838e122c3e8aa8b7c52e8996dacadb1c.tar.bz2 |
testsuite: Make char4-subscript.f90 regex endian neutral.
The testcase tests for little endian results. This patch updates the
regex to accept either endianness.
gcc/testsuite/ChangeLog
2020-06-29 David Edelsohn <dje.gcc@gmail.com>
* gfortran.dg/char4-subscript.f90: Simplify regex.
Accept big endian or little endian output.
-rw-r--r-- | gcc/testsuite/gfortran.dg/char4-subscript.f90 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/gfortran.dg/char4-subscript.f90 b/gcc/testsuite/gfortran.dg/char4-subscript.f90 index f1f915c..fd1cf69 100644 --- a/gcc/testsuite/gfortran.dg/char4-subscript.f90 +++ b/gcc/testsuite/gfortran.dg/char4-subscript.f90 @@ -24,7 +24,7 @@ end ! Note: the last '\x00' is regarded as string terminator, hence, the tailing \0 byte is not in the dump -! { dg-final { scan-tree-dump " \\(\\*var\\.str2\\)\\\[1\\\]{lb: 1 sz: 4} = .d\\\\x00\\\\x00.\\\[1\\\]{lb: 1 sz: 4};" "original" } } -! { dg-final { scan-tree-dump " __builtin_memmove \\(\\(void \\*\\) &\\(\\*var.str2\\)\\\[2\\\]{lb: 1 sz: 4}, \\(void \\*\\) &.e\\\\x00\\\\x00\\\\x00f\\\\x00\\\\x00.\\\[1\\\]{lb: 1 sz: 4}, 8\\);" "original" } } -! { dg-final { scan-tree-dump " \\(\\*var.str2\\)\\\[4\\\]{lb: 1 sz: 4} = .\\\\x00\\\\xf6\\\\x01.\\\[1\\\]{lb: 1 sz: 4};" "original" } } -! { dg-final { scan-tree-dump " \\(\\*var.str2\\)\\\[5\\\]{lb: 1 sz: 4} = .\\\\b\\\\xf6\\\\x01.\\\[1\\\]{lb: 1 sz: 4};" "original" } } +! { dg-final { scan-tree-dump { \(\*var\.str2\)\[1\]{lb: 1 sz: 4} = "(d\\x00\\x00|\\x00\\x00\\x00d)"\[1\]{lb: 1 sz: 4};} "original" } } +! { dg-final { scan-tree-dump { __builtin_memmove \(\(void \*\) &\(\*var.str2\)\[2\]{lb: 1 sz: 4}, \(void \*\) &"(e\\x00\\x00\\x00f\\x00\\x00|\\x00\\x00\\x00e\\x00\\x00\\x00f)"\[1\]{lb: 1 sz: 4}, 8\);} "original" } } +! { dg-final { scan-tree-dump { \(\*var.str2\)\[4\]{lb: 1 sz: 4} = "(\\x00\\xf6\\x01|\\x00\\x01\\xf6)"\[1\]{lb: 1 sz: 4};} "original" } } +! { dg-final { scan-tree-dump { \(\*var.str2\)\[5\]{lb: 1 sz: 4} = "(\\b\\xf6\\x01|\\x00\\x01\\xf6\\b)"\[1\]{lb: 1 sz: 4};} "original" } } |