Compiler internal error on misuse of the % operator

If you have a simple question and just want an answer.
dfe
New User
Posts: 3
Joined: Mon Jul 20, 2015 10:38 pm

Compiler internal error on misuse of the % operator

Post by dfe »

[Sorry for thre bogus formatting.]

Clearly this use of %= is suspicious:

int main(void) {

float x = 0;

 

x %= 5;

 

return 0;

}

 

but this behaviour by xcc

Code: Select all

Community_14.0.3 (build 17001, May-26-2015)Compiler version: 14.0.3Copyright (C) XMOS Limited 2008-2015. All Rights Reserved.
is not too helpful:
 
xcc1: terminated due to internal unrecoverable error
 
Clang

Code: Select all

Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)Target: x86_64-apple-darwin14.4.0Thread model: posix
says this:

Code: Select all

foo.c:4:4: error: invalid operands to binary expression ('float' and 'float')        x %= 5;        ~ ^  ~
which is better.
 
Shall I file a bug report?
 
Thanks!
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Yes, this is definitely a bug, if you would report via xmos.com, that would be great.https://www.xmos.com/rt3/SelfService/Cr ... htmlThanks