From: Martin Liska Date: Fri, 29 Jun 2018 09:31:30 +0000 (+0200) Subject: Partial backport r256656 X-Git-Tag: releases/gcc-7.4.0~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f34342aa43f2219fb92ed3449ed609e5413eafce;p=thirdparty%2Fgcc.git Partial backport r256656 2018-06-29 Martin Liska Backport from mainline 2018-01-10 Kelvin Nilsen * lex.c (search_line_fast): Remove illegal coercion of an unaligned pointer value to vector pointer type and replace with use of __builtin_vec_vsx_ld () built-in function, which operates on unaligned pointer values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4 From-SVN: r262243 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d47aac3299f..ca48a0787c72 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2018-06-29 Martin Liska + + Backport from mainline + 2018-01-10 Kelvin Nilsen + + * lex.c (search_line_fast): Remove illegal coercion of an + unaligned pointer value to vector pointer type and replace with + use of __builtin_vec_vsx_ld () built-in function, which operates + on unaligned pointer values. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@261621 138bc75d-0d04-0410-961f-82ee72b054a4 + 2018-06-27 David Edelsohn 2018-06-19 Tony Reix diff --git a/libcpp/lex.c b/libcpp/lex.c index 097c78002cbb..e0fb9e822c44 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) { vc m_nl, m_cr, m_bs, m_qm; - data = *((const vc *)s); + data = __builtin_vec_vsx_ld (0, s); s += 16; m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl);