https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107358
Bug ID: 107358 Summary: [13 Regression] i686-linux: Since r13-3290-g98e341130f8798 code fails to build libjxl-0/7.0 (vector float code) Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org CC: jakub at gcc dot gnu.org, jakub at redhat dot com Target Milestone: --- Initially observed build failure on libjxl-0.7.0 on i686-linux target. Seems to happen only on i686-unknown-linux-gnu and only on -std=c++11. PR107295 does not seem to be enough to fix it. Here is the minimal example: // $ cat skcms.cc // this works: float approx_scal(float e) { return e - 124.225514990f; } typedef float __attribute__((vector_size(4*sizeof(float)))) F; // this fails: // error: conversion of scalar 'long double' to vector 'F' {aka '__vector(4) float'} involves truncation F approx_vec(F e) { return e - 124.225514990f; //return e - 1.0f; // this works, does 'f' get ignored when float does not fit? } $ g++-13 -fPIC -std=c++11 -o skcms.cc.o -c skcms.cc skcms.cc: In function 'F approx_vec(F)': skcms.cc:10:17: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] 10 | F approx_vec(F e) { | ^ skcms.cc:11:14: error: conversion of scalar 'long double' to vector 'F' {aka '__vector(4) float'} involves truncation 11 | return e - 124.225514990f; | ~~^~~~~~~~~~~~~~~~ $ g++-12 -fPIC -std=c++11 -o skcms.cc.o -c skcms.cc skcms.cc: In function 'F approx_vec(F)': skcms.cc:10:17: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] 10 | F approx_vec(F e) { | ^ skcms.cc:10:3: note: the ABI for passing parameters with 16-byte alignment has changed in GCC 4.6 10 | F approx_vec(F e) { | ^~~~~~~~~~ skcms.cc:10:3: warning: SSE vector argument without SSE enabled changes the ABI Note: gcc-12 works, gcc-13 fails.