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

            Bug ID: 87075
           Summary: ICE when compiling the test suite of GLM 0.9.9.0
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guus at debian dot org
  Target Milestone: ---

When compiling the test suite of GLM 0.9.9.0, a header-only OpenGL mathematics
library, a compiler error occurs with GCC 7 and later, but it seems earlier
versions work fine. The attached dump is from 8.2.0 when compiling the test
suite. A minimal program to reproduce it, with the GLM 0.9.9.0 headers
installed, is:

#include <glm/glm.hpp>

using namespace glm;

int main() {
    mat2 a(0,1,2,3); // GCC from trunk already fails here
    mat2 b = matrixCompMult(a, a);
    mat2 c = mat2(0,1,2,3); // no ICE on 8.2.0 for: mat2 c(0,1,2,3);
}

The error message when compiling this example with 8.2.0:

<source>: In function 'int main()':
<source>:8:26: internal compiler error: in gimplify_expr, at gimplify.c:12385
     mat2 c = mat2(0,1,2,3); // no ICE on 8.2.0 for: mat2 c(0,1,2,3);
                          ^

The error message when compiling this example with trunk:

<source>: In function 'int main()':
<source>:6:19:   in 'constexpr' expansion of 'a.glm::mat<2, 2, float,
(glm::qualifier)0>::mat<int, int, int, int>(0, 1, 2, 3)'
<source>:6:19: internal compiler error: tree check: expected constructor, have
void_cst in cxx_eval_store_expression, at cp/constexpr.c:3785
6 |     mat2 a(0,1,2,3); // GCC from trunk already fails here
  |                   ^

Let me know if I can provide more help.

Reply via email to