public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103746] New: GCC 12 rejects code on "call to non-‘constexpr’ function ‘glsl::vec3& glsl::vec3::operator=(glsl::vec3&&)’" while gcc 11 and clang accepts it
@ 2021-12-16 11:00 hubicka at gcc dot gnu.org
  2021-12-16 11:14 ` [Bug c++/103746] " marxin at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-12-16 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-12-16 12:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 11:00 [Bug c++/103746] New: GCC 12 rejects code on "call to non-‘constexpr’ function ‘glsl::vec3& glsl::vec3::operator=(glsl::vec3&&)’" while gcc 11 and clang accepts it hubicka at gcc dot gnu.org
2021-12-16 11:14 ` [Bug c++/103746] " marxin at gcc dot gnu.org
2021-12-16 11:28 ` hubicka at gcc dot gnu.org
2021-12-16 11:29 ` hubicka at gcc dot gnu.org
2021-12-16 11:31 ` [Bug c++/103746] [12 Regression] " pinskia at gcc dot gnu.org
2021-12-16 11:33 ` marxin at gcc dot gnu.org
2021-12-16 11:34 ` [Bug c++/103746] [12 Regression] Rejected code "call to non-‘constexpr’ function ‘glsl::vec3& glsl::vec3::operator=(glsl::vec3&&)’" since r12-5256-g37326651b439bac5 marxin at gcc dot gnu.org
2021-12-16 11:40 ` marxin at gcc dot gnu.org
2021-12-16 11:41 ` [Bug c++/103746] [12 Regression] GCC 12 rejects code on "call to non-‘constexpr’ function ‘glsl::vec3& glsl::vec3::operator=(glsl::vec3&&)’" while gcc 11 and clang accepts it pinskia at gcc dot gnu.org
2021-12-16 11:41 ` marxin at gcc dot gnu.org
2021-12-16 11:46 ` [Bug c++/103746] [12 Regression] Rejected code on "call to non-‘constexpr’ function ‘glsl::vec3& glsl::vec3::operator=(glsl::vec3&&)’" since r12-5256-g37326651b439bac5 pinskia at gcc dot gnu.org
2021-12-16 11:46 ` pinskia at gcc dot gnu.org
2021-12-16 11:49 ` pinskia at gcc dot gnu.org
2021-12-16 12:54 ` hubicka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).