Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7942 Discussions

float _Complex fc = 1.5DF; => internal error in icc11.1

tydeman
Beginner
221 Views
Code similar to:

#define __STDC_WANT_DEC_FP__
static float _Complex fc = 1.5DF;

gets: internal error: assertion failed: type_change_constant: decimal_float to bad type ...

This is icc 11.1 in IA-32 mode on Linux Fedora Core 10 on Pentium 4 in IA-32 mode.
0 Kudos
3 Replies
Milind_Kulkarni__Int
New Contributor II
221 Views
Do you mean typecasting the Decimal32 to float _Complex. I don't think that would work.

This works though:--

//#define __STDC_WANT_DEC_FP__

static double _Complex fc = 1.5i;

_Decimal32 fc2=1.5DF;

Also, to work with Decimal types, I think .c extension (C-file) will only work.

0 Kudos
tydeman
Beginner
221 Views
I mean that code as written. That is an assignment from _Decimal32 to
float _Complex. It is supposed to work. This is a *.c file.
0 Kudos
Milind_Kulkarni__Int
New Contributor II
221 Views
yes, you sound correct. gcc compilers starting from 4.3.x and onwards have that working. I have escalated this to the compiler team, to get it resolved.
0 Kudos
Reply