- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We ran into this internal compiler error with our open source code, described here: https://github.com/manodeep/Corrfunc/issues/100. We have fixed it for the repo but figured it might be helpful for the compiler developers.
Thanks to the efforts of Lehman Garrison (github: @lgarrison), here is a minimum failing example:
#include <immintrin.h> #include <stdio.h> #include <stdint.h> #define MAX_NUM_WEIGHTS 10 typedef union { __m256d a; double d; } weights_union; typedef struct { int64_t num_weights; weights_union weights0[MAX_NUM_WEIGHTS]; weights_union dx; } pair_struct; int main(void){ int64_t num_weights = 0; pair_struct pair = {.num_weights = num_weights, .dx.d=0. }; return 0; }
Compiling with "icc -std=c99 -Wall test.c -o test" causes the following error:
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.
icc --version
icc (ICC) 15.0.2 20150121
Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
Swapping num_weights and weights0 in the pair_struct solves the problem. As @lgarrison noted in the github issue, the ICE must be related to alignment requirements.
Please let me know if you need any further info.
Thanks,
Manodeep Sinha
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ icl -Qstd=c99 -Wall ms.c
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.143 Build 20161005
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
ms.c
ms.c(21): remark #177: variable "pair" was declared but never referenced
pair_struct pair = {.num_weights = num_weights,
^
": internal error: ** The compiler has encountered an unexpected problem.
** Segmentation violation signal raised. **
Access violation or stack overflow. Please contact Intel Support for assistance.
compilation aborted for ms.c (code 4)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to be a compiler bug. I'l work on it and keep you posted.
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manodeep,
I have reported this issue to our developer. The tracker is DPD200415977.
Thanks,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page