nested_struct.carbon 729 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. fn Run() -> i32 {
  7. {.b = {.a: i32}};
  8. return 0;
  9. }
  10. // CHECK:STDOUT: ; ModuleID = 'nested_struct.carbon'
  11. // CHECK:STDOUT: source_filename = "nested_struct.carbon"
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: %type = type {}
  14. // CHECK:STDOUT:
  15. // CHECK:STDOUT: define i32 @Run() {
  16. // CHECK:STDOUT: %struct = alloca { %type }, align 8
  17. // CHECK:STDOUT: %b = getelementptr inbounds { %type }, ptr %struct, i32 0, i32 0
  18. // CHECK:STDOUT: store %type zeroinitializer, ptr %b, align 1
  19. // CHECK:STDOUT: ret i32 0
  20. // CHECK:STDOUT: }