Source file test/simd/bug4.go

     1  // compile
     2  
     3  //go:build amd64 && goexperiment.simd
     4  
     5  // Copyright 2026 The Go Authors. All rights reserved.
     6  // Use of this source code is governed by a BSD-style
     7  // license that can be found in the LICENSE file.
     8  
     9  // Test case for ICE on a package-scope var initializer that calls a
    10  // simd function. The midway deep copier built the emulation copy with
    11  // the original selector name node, so the re-check after the rewrite
    12  // resolved the original simd.BroadcastUint8s to the bridge object
    13  // while its cached type still held the simd signature. See issue 80689.
    14  
    15  package p
    16  
    17  import "simd"
    18  
    19  var b = simd.BroadcastUint8s(0x20)
    20  
    21  func f() simd.Uint8s {
    22  	return b.Or(b)
    23  }
    24  

View as plain text