Closed nenadv closed 7 years ago
AMDG
On 03/20/2017 02:18 PM, Nenad Vukicevic wrote:
This simple test
#include <stdio.h> #include <stdint.h> #include <upc.h> shared uint8_t x8_2F = 0x2F; int main() { printf ("%d\n", x8_2F); }
fails if compiled with optimizations higher then 0.
The initialization is silently lost, right? Adding the variable to llvm.used should fix the problem.
In Christ, Steven Watanabe
When optimized, we are missing 'upc_init_array' section that has the shared initialization functions. I checked the IR code and functions are indeed missing.
This simple test
fails if compiled with optimizations higher then 0.