https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121573
Benjamin Schulz <schulz.benjamin at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Status|RESOLVED |UNCONFIRMED --- Comment #3 from Benjamin Schulz <schulz.benjamin at googlemail dot com> --- I want to note is that this is potentially dangerous if a source which looks standars compilant, gets such different outputs with ngc++ and gcc nvc++ output: on host: a=42 b=3.140000 on nvidia on parallel region, should be 42; dev_var.a=0 on parallel region, should be 3.14: dev_var.b=0.000000 Device-resident struct copied back, should be 42 and 3.14: a=0 b=0.000000 gcc output: on host: a=42 b=3.140000 on nvidia on parallel region, should be 42; dev_var.a=42 on parallel region, should be 3.14: dev_var.b=3.140000 Device-resident struct copied back, should be 42 and 3.14: a=42 b=3.140000 Both compilers create a device variable and a host variable for something that should, according to the spec, reside on device only. And they understand the initialization differently. GCC initializes on host and device, and initializes it with these values, while nvc++ forgets the initialization on the device... I do not think that this is resolved invalid. since some problem is there if one declares the variable above the pragma...