This program prints 0, when it, clearly, should print 11.
#include <stdio.h> struct S0 { int t = 11; }; struct S2 : virtual S0 { }; S2 g_1[1]; int main(int argc, char* argv[]) { printf("%d", g_1[0].t); }
This code compiled with the follow command on windows:
iclvars.bat intel64 & icl file.cpp /w /link /out:file.exe
Version:
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.3.207 Build 20160415
Zone:
Thread Topic:
Bug Report