Pelles C forum

Pelles C => Bug reports => Topic started by: cool on November 02, 2019, 11:39:19 PM

Title: Floating Point Optimization Internal Error
Post by: cool on November 02, 2019, 11:39:19 PM
Compiling this snippet from my vector library for x64 with speed optimizations enabled fails with an internal error. The flags used are as follows:

-std:C17 -Tx64-coff -arch:SSE2 -Ot -Ob1 -fp:fast -W2 -Ze

Code: [Select]
#include <stdalign.h>

typedef struct {
  alignas(16) float data[4];
} vec_t;

typedef struct {
  alignas(16) float data[4][4];
} mat_t;

mat_t translate(vec_t v)
{
  mat_t res = {.data = {
    {1, 0, 0, v.data[0]},
    {0, 1, 0, v.data[1]},
    {0, 0, 1, v.data[2]},
    {0, 0, 0, 1}
  }};
  return res;
}

fatal error: Internal error: 'Access violation' at 0x000000013fa01b50.
Title: Re: Floating Point Optimization Internal Error
Post by: Pelle on November 03, 2019, 10:36:14 PM
OK, I can reproduce this. I will take a look...