https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103746

            Bug ID: 103746
           Summary: GCC 12 rejects code on "call to non-‘constexpr’
                    function ‘glsl::vec3&
                    glsl::vec3::operator=(glsl::vec3&&)’" while gcc 11 and
                    clang accepts it
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
  Target Milestone: ---

Created attachment 52012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52012&action=edit
testcase

Building Firefox with trunk fails on many errors of type:

src/glsl.h: In constructor ‘constexpr glsl::mat3::mat3(glsl::Float,
glsl::Float, glsl::Float, glsl::Float, glsl::Float, glsl::Float, glsl::Float,
glsl::Float, glsl::Float)’:
src/glsl.h:2427:30: error: call to non-‘constexpr’ function ‘glsl::vec3&
glsl::vec3::operator=(glsl::vec3&&)’
 2427 |     data[0] = vec3(d1, d2, d3);
      |                              ^


I am not qite sure if this is valid error, however it is not diagnosed by GCC
11 and clang.  The catch is that it also come from rust code and things that
are imported to tree, so in order to build the firefox for testing, I would
welcome a way to avoid this error even if it is valid (perhaps with
-fpermissive?)

testcase fails with:
g++ -O2 /tmp/test.ii -std=c++17 -Wno-attributes

Reply via email to