Page 1 of 1

14.3.2 compiler error

Posted: Fri Jan 26, 2018 4:18 pm
by akp
Hi

I am trying to build code that builds fine in 14.2.4 in 14.3.2. My code is based on AN00203 (which builds fine in both versions). However, I am getting a weird compiler error I would like to report but I am not sure how to generate a minimal example. Any clue as to what kind of construct in my code would error out in the compiler with this message:

Code: Select all

xcc1: internal compiler error
Failed in ..\Common\Constant\constant.cpp, line 665
	v.choice != TYPE_DERIVED_ENUM && "should isTypeIntegral(v) be used instead of isTypeInteger(v) below?"
For bug reporting instructions, please see:
http://www.xmos.com/support
xmake[1]: *** [.build/src/main.xc.o] Error 1

Re: 14.3.2 compiler error

Posted: Fri Jan 26, 2018 4:41 pm
by akp
Found it. I was mixing the enumerated type ethernet_speed_t with its integer equivalents like a cowboy.

/** Type representing the PHY link speed and duplex */
typedef enum ethernet_speed_t {
LINK_10_MBPS_FULL_DUPLEX, /**< 10 Mbps full duplex */
LINK_100_MBPS_FULL_DUPLEX, /**< 100 Mbps full duplex */
LINK_1000_MBPS_FULL_DUPLEX, /**< 1000 Mbps full duplex */
NUM_ETHERNET_SPEEDS /**< Count of speeds in this enum */
} ethernet_speed_t;