@no_asan('ASan does not work with EXPORT_ALL')
def test_constglobalunion(self):
    self.emcc_args += ['-s', 'EXPORT_ALL=1']
    self.do_run('\n#include <stdio.h>\n\nstruct one_const {\n  long a;\n};\n\nstruct two_consts {\n  long a;\n  long b;\n};\n\nunion some_consts {\n  struct one_const one;\n  struct two_consts two;\n};\n\nunion some_consts my_consts = {{\n  1\n}};\n\nstruct one_const addr_of_my_consts = {\n  (long)(&my_consts)\n};\n\nint main(void) {\n  printf("%li\\n", (long)!!addr_of_my_consts.a);\n  return 0;\n}\n    ', '1')
@no_asan('ASan does not work with EXPORT_ALL')
def test_constglobalunion(self):
    self.emcc_args += ['-s', 'EXPORT_ALL=1']
    self.do_run('\n#include <stdio.h>\n\nstruct one_const {\n  long a;\n};\n\nstruct two_consts {\n  long a;\n  long b;\n};\n\nunion some_consts {\n  struct one_const one;\n  struct two_consts two;\n};\n\nunion some_consts my_consts = {{\n  1\n}};\n\nstruct one_const addr_of_my_consts = {\n  (long)(&my_consts)\n};\n\nint main(void) {\n  printf("%li\\n", (long)!!addr_of_my_consts.a);\n  return 0;\n}\n    ', '1')