Source file test/fixedbugs/issue7746.go

     1  // errorcheck
     2  
     3  // Copyright 2015 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  package main
     8  
     9  const (
    10  	c0   = 1 << 100
    11  	c1   = c0 * c0
    12  	c2   = c1 * c1
    13  	c3   = c2 * c2 // GC_ERROR "overflow"
    14  	c4   = c3 * c3
    15  	c5   = c4 * c4
    16  	c6   = c5 * c5
    17  	c7   = c6 * c6
    18  	c8   = c7 * c7
    19  	c9   = c8 * c8
    20  	c10  = c9 * c9
    21  	c11  = c10 * c10
    22  	c12  = c11 * c11
    23  	c13  = c12 * c12
    24  	c14  = c13 * c13 // GCCGO_ERROR "overflow"
    25  	c15  = c14 * c14
    26  	c16  = c15 * c15
    27  	c17  = c16 * c16
    28  	c18  = c17 * c17
    29  	c19  = c18 * c18
    30  	c20  = c19 * c19
    31  	c21  = c20 * c20
    32  	c22  = c21 * c21
    33  	c23  = c22 * c22
    34  	c24  = c23 * c23
    35  	c25  = c24 * c24
    36  	c26  = c25 * c25
    37  	c27  = c26 * c26
    38  	c28  = c27 * c27
    39  	c29  = c28 * c28
    40  	c30  = c29 * c29
    41  	c31  = c30 * c30
    42  	c32  = c31 * c31
    43  	c33  = c32 * c32
    44  	c34  = c33 * c33
    45  	c35  = c34 * c34
    46  	c36  = c35 * c35
    47  	c37  = c36 * c36
    48  	c38  = c37 * c37
    49  	c39  = c38 * c38
    50  	c40  = c39 * c39
    51  	c41  = c40 * c40
    52  	c42  = c41 * c41
    53  	c43  = c42 * c42
    54  	c44  = c43 * c43
    55  	c45  = c44 * c44
    56  	c46  = c45 * c45
    57  	c47  = c46 * c46
    58  	c48  = c47 * c47
    59  	c49  = c48 * c48
    60  	c50  = c49 * c49
    61  	c51  = c50 * c50
    62  	c52  = c51 * c51
    63  	c53  = c52 * c52
    64  	c54  = c53 * c53
    65  	c55  = c54 * c54
    66  	c56  = c55 * c55
    67  	c57  = c56 * c56
    68  	c58  = c57 * c57
    69  	c59  = c58 * c58
    70  	c60  = c59 * c59
    71  	c61  = c60 * c60
    72  	c62  = c61 * c61
    73  	c63  = c62 * c62
    74  	c64  = c63 * c63
    75  	c65  = c64 * c64
    76  	c66  = c65 * c65
    77  	c67  = c66 * c66
    78  	c68  = c67 * c67
    79  	c69  = c68 * c68
    80  	c70  = c69 * c69
    81  	c71  = c70 * c70
    82  	c72  = c71 * c71
    83  	c73  = c72 * c72
    84  	c74  = c73 * c73
    85  	c75  = c74 * c74
    86  	c76  = c75 * c75
    87  	c77  = c76 * c76
    88  	c78  = c77 * c77
    89  	c79  = c78 * c78
    90  	c80  = c79 * c79
    91  	c81  = c80 * c80
    92  	c82  = c81 * c81
    93  	c83  = c82 * c82
    94  	c84  = c83 * c83
    95  	c85  = c84 * c84
    96  	c86  = c85 * c85
    97  	c87  = c86 * c86
    98  	c88  = c87 * c87
    99  	c89  = c88 * c88
   100  	c90  = c89 * c89
   101  	c91  = c90 * c90
   102  	c92  = c91 * c91
   103  	c93  = c92 * c92
   104  	c94  = c93 * c93
   105  	c95  = c94 * c94
   106  	c96  = c95 * c95
   107  	c97  = c96 * c96
   108  	c98  = c97 * c97
   109  	c99  = c98 * c98
   110  	c100 = c99 * c99
   111  )
   112  
   113  func main() {
   114  	println(c1 / c1)
   115  	println(c2 / c2)
   116  	println(c3 / c3)
   117  	println(c4 / c4)
   118  	println(c5 / c5)
   119  	println(c6 / c6)
   120  	println(c7 / c7)
   121  	println(c8 / c8)
   122  	println(c9 / c9)
   123  	println(c10 / c10)
   124  	println(c20 / c20)
   125  	println(c30 / c30)
   126  	println(c40 / c40)
   127  	println(c50 / c50)
   128  	println(c60 / c60)
   129  	println(c70 / c70)
   130  	println(c80 / c80)
   131  	println(c90 / c90)
   132  	println(c100 / c100)
   133  }
   134  

View as plain text