Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Assembly
C
Carbon
C++ (Circle)
CIRCT
Clean
CMake
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Erlang
Fortran
F#
Go
Haskell
HLSL
Hook
ispc
Java
Julia
Kotlin
LLVM IR
Nim
Objective-C
Objective-C++
OCaml
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Scala
Solidity
Swift
Toit
TypeScript Native
Visual Basic
Zig
go source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Compiler
386 gc (tip)
386 gc 1.14
386 gc 1.15
386 gc 1.16
386 gc 1.17
386 gc 1.18
386 gc 1.19
ARM gc (tip)
ARM gc 1.14
ARM gc 1.15
ARM gc 1.16
ARM gc 1.17
ARM gc 1.18
ARM gc 1.19
ARM64 gc (tip)
ARM64 gc 1.14
ARM64 gc 1.15
ARM64 gc 1.16
ARM64 gc 1.17
ARM64 gc 1.18
ARM64 gc 1.19
MIPS gc (tip)
MIPS gc 1.14
MIPS gc 1.15
MIPS gc 1.16
MIPS gc 1.17
MIPS gc 1.18
MIPS gc 1.19
MIPS64 gc (tip)
MIPS64 gc 1.14
MIPS64 gc 1.15
MIPS64 gc 1.16
MIPS64 gc 1.17
MIPS64 gc 1.18
MIPS64 gc 1.19
MIPS64LE gc (tip)
MIPS64LE gc 1.14
MIPS64LE gc 1.15
MIPS64LE gc 1.16
MIPS64LE gc 1.17
MIPS64LE gc 1.18
MIPS64LE gc 1.19
MIPSLE gc (tip)
MIPSLE gc 1.14
MIPSLE gc 1.15
MIPSLE gc 1.16
MIPSLE gc 1.17
MIPSLE gc 1.18
MIPSLE gc 1.19
PPC64 gc (tip)
PPC64 gc 1.14
PPC64 gc 1.15
PPC64 gc 1.16
PPC64 gc 1.17
PPC64 gc 1.18
PPC64 gc 1.19
PPC64LE gc (tip)
PPC64LE gc 1.14
PPC64LE gc 1.15
PPC64LE gc 1.16
PPC64LE gc 1.17
PPC64LE gc 1.18
PPC64LE gc 1.19
RISCV64 gc (tip)
RISCV64 gc 1.14
RISCV64 gc 1.15
RISCV64 gc 1.16
RISCV64 gc 1.17
RISCV64 gc 1.18
RISCV64 gc 1.19
S390X gc (tip)
S390X gc 1.14
S390X gc 1.15
S390X gc 1.16
S390X gc 1.17
S390X gc 1.18
S390X gc 1.19
WASM gc (tip)
WASM gc 1.14
WASM gc 1.15
WASM gc 1.16
WASM gc 1.17
WASM gc 1.18
WASM gc 1.19
amd64 gc (tip)
amd64 gc 1.10
amd64 gc 1.10.1
amd64 gc 1.11
amd64 gc 1.12
amd64 gc 1.13
amd64 gc 1.14
amd64 gc 1.15
amd64 gc 1.16
amd64 gc 1.17
amd64 gc 1.18
amd64 gc 1.19
amd64 gc 1.4.1
amd64 gc 1.7.2
amd64 gc 1.8.5
amd64 gc 1.8.7
amd64 gc 1.9.2
amd64 gc 1.9.4
arm 12.2.0
arm64 12.2.0
mips 12.2.0
mips64 12.2.0
mips64el 12.2.0
mipsel 12.2.0
power64 AT12.0
power64 AT13.0
power64le AT12.0
power64le AT13.0
powerpc 12.2.0
powerpc64 12.2.0
powerpc64le 12.2.0
riscv64 12.2.0
s390x 12.2.0
sparc 12.2.0
sparc64 12.2.0
x86 gccgo 10.2.0
x86 gccgo 11.1.0
x86 gccgo 11.2.0
x86 gccgo 11.3.0
x86 gccgo 12.1.0
x86 gccgo 12.2.0
x86 gccgo 4.9.4
x86 gccgo 6.3.0
x86 gccgo 7.2.0
x86 gccgo 8.3.0
x86 gccgo 9.3.0
x86 gccgo 9.5.0
Options
Source code
// Type your code here, or load an example. // Your function name should start with a capital letter. package main func Square(x int) int { return x * x } func main() {}
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
About the author
Changelog
Version tree