(In reply to Federico Mena Quintero from comment #2) > So... the failure is with the LLVM7 included in rustc? > AFAIU, in all cases I looked at, the system LLVM is used. [ FWIW, the version bundled with the 1.32.0 tarball in openSUSE:Leap:15.1:rust is already LLVM8. ] > And it works when we use the system's LLVM8? I dug a bit further, and found the following code change: ... $ git diff 1.32.0 1.33.0 -- librustc_codegen_llvm/debuginfo/metadata.rs @@ -1173,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool { // On MSVC we have to use the fallback mode, because LLVM doesn't // lower variant parts to PDB. return cx.sess().target.target.options.is_like_msvc - || llvm_util::get_major_version() < 7; + // LLVM version 7 did not release with an important bug fix; + // but the required patch is in the LLVM 8. Rust LLVM reports + // 8 as well. + || llvm_util::get_major_version() < 8; } // Describes the members of an enum value: An enum is described as a union of ... So, we have: 1. openSUSE Leap 15.1 without update repository: - rustc version 1.32.0 - system llvm 7 2. openSUSE Leap 15.1 with update repository: - rustc version 1.36.0 - system llvm 7 3. openSUSE Tumbleweed: - rustc version 1.37.0 - system llvm 8 In case 1, use_enum_fallback returns false, because llvm version is 7 (required to be at least 7 to avoid fallback). So the fallback is not used, the compiler generates a DW_TAG_variant description of the enum, and the correct value is printed. In case 2, use_enum_fallback returns true, because llvm version is 7 (required to be at least 8 to avoid fallback). So the fallback is used, the compiler generates a legacy description of the enum, which contains a bug, and the incorrect value is printed. In case 3, use_enum_fallback returns true, because llvm version is 8 (required to be at least 8 to avoid fallback). So the fallback is not used, and things are back to how they were at case 1.