https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118524
Bug ID: 118524
Summary: Wrong assembler for string view literals on ARM64 gcc
trunk
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: filip.svensson at embeddev dot se
Target Milestone: ---
https://godbolt.org/z/fYjEzYP4n
#include <iostream>
#include <string_view>
using namespace std::literals;
constexpr std::string_view s1 = "a\0\0b";
constexpr std::string_view s2 = "c\0\0d"sv;
int main()
{
std::cout << s1 << s2;
}
See the different output between 14.2 and trunk.
For s1 there is a difference but it must not be wrong.
For s2 the .LC1 is wrong