NO

Author Topic: Floating Point Optimization Internal Error  (Read 2110 times)

cool

  • Guest
Floating Point Optimization Internal Error
« 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.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Floating Point Optimization Internal Error
« Reply #1 on: November 03, 2019, 10:36:14 PM »
OK, I can reproduce this. I will take a look...
/Pelle