GAS LISTING /tmp/ccQGxGDZ.s page 1 1 .file "type-inference.cpp" 2 .text 3 .Ltext0: 5 _Z41__static_initialization_and_destruction_0ii: 6 .LFB1400: 7 .file 1 "type-inference.cpp" 1:type-inference.cpp **** #include <iostream> 2:type-inference.cpp **** 3:type-inference.cpp **** double someFunc(const int &v, const double &d) { 4:type-inference.cpp **** return v + d; 5:type-inference.cpp **** } 6:type-inference.cpp **** 7:type-inference.cpp **** void typeInference() { 8:type-inference.cpp **** 9:type-inference.cpp **** auto v = 12; 10:type-inference.cpp **** 11:type-inference.cpp **** auto d = 12 / 3.3; 12:type-inference.cpp **** 13:type-inference.cpp **** auto r = someFunc(v, d); 14:type-inference.cpp **** 15:type-inference.cpp **** std::cout << "typeInference" << v << " " << d << " " << r << std::endl; 16:type-inference.cpp **** 17:type-inference.cpp **** int v2 = 12; 18:type-inference.cpp **** 19:type-inference.cpp **** double d2 = 12 / 3.3; 20:type-inference.cpp **** 21:type-inference.cpp **** double r2 = someFunc(v, d); 22:type-inference.cpp **** 23:type-inference.cpp **** std::cout << "typeInference" << v2 << " " << d2 << " " << r2 << std::endl; 24:type-inference.cpp **** } 8 .loc 1 24 0 9 .cfi_startproc 10 .LVL0: 11 0000 83FF01 cmpl $1, %edi 12 0003 752E jne .L5 13 .loc 1 24 0 discriminator 1 14 0005 81FEFFFF cmpl $65535, %esi 14 0000 15 000b 7526 jne .L5 16 .loc 1 24 0 is_stmt 0 17 000d 4883EC08 subq $8, %rsp 18 .cfi_def_cfa_offset 16 19 .file 2 "/usr/include/c++/4.8/iostream" 1:/usr/include/c++/4.8/iostream **** // Standard iostream objects -*- C++ -*- 2:/usr/include/c++/4.8/iostream **** 3:/usr/include/c++/4.8/iostream **** // Copyright (C) 1997-2013 Free Software Foundation, Inc. 4:/usr/include/c++/4.8/iostream **** // 5:/usr/include/c++/4.8/iostream **** // This file is part of the GNU ISO C++ Library. This library is free 6:/usr/include/c++/4.8/iostream **** // software; you can redistribute it and/or modify it under the 7:/usr/include/c++/4.8/iostream **** // terms of the GNU General Public License as published by the 8:/usr/include/c++/4.8/iostream **** // Free Software Foundation; either version 3, or (at your option) 9:/usr/include/c++/4.8/iostream **** // any later version. 10:/usr/include/c++/4.8/iostream **** 11:/usr/include/c++/4.8/iostream **** // This library is distributed in the hope that it will be useful, 12:/usr/include/c++/4.8/iostream **** // but WITHOUT ANY WARRANTY; without even the implied warranty of 13:/usr/include/c++/4.8/iostream **** // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14:/usr/include/c++/4.8/iostream **** // GNU General Public License for more details. GAS LISTING /tmp/ccQGxGDZ.s page 2 15:/usr/include/c++/4.8/iostream **** 16:/usr/include/c++/4.8/iostream **** // Under Section 7 of GPL version 3, you are granted additional 17:/usr/include/c++/4.8/iostream **** // permissions described in the GCC Runtime Library Exception, version 18:/usr/include/c++/4.8/iostream **** // 3.1, as published by the Free Software Foundation. 19:/usr/include/c++/4.8/iostream **** 20:/usr/include/c++/4.8/iostream **** // You should have received a copy of the GNU General Public License and 21:/usr/include/c++/4.8/iostream **** // a copy of the GCC Runtime Library Exception along with this program; 22:/usr/include/c++/4.8/iostream **** // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23:/usr/include/c++/4.8/iostream **** // <http://www.gnu.org/licenses/>. 24:/usr/include/c++/4.8/iostream **** 25:/usr/include/c++/4.8/iostream **** /** @file include/iostream 26:/usr/include/c++/4.8/iostream **** * This is a Standard C++ Library header. 27:/usr/include/c++/4.8/iostream **** */ 28:/usr/include/c++/4.8/iostream **** 29:/usr/include/c++/4.8/iostream **** // 30:/usr/include/c++/4.8/iostream **** // ISO C++ 14882: 27.3 Standard iostream objects 31:/usr/include/c++/4.8/iostream **** // 32:/usr/include/c++/4.8/iostream **** 33:/usr/include/c++/4.8/iostream **** #ifndef _GLIBCXX_IOSTREAM 34:/usr/include/c++/4.8/iostream **** #define _GLIBCXX_IOSTREAM 1 35:/usr/include/c++/4.8/iostream **** 36:/usr/include/c++/4.8/iostream **** #pragma GCC system_header 37:/usr/include/c++/4.8/iostream **** 38:/usr/include/c++/4.8/iostream **** #include <bits/c++config.h> 39:/usr/include/c++/4.8/iostream **** #include <ostream> 40:/usr/include/c++/4.8/iostream **** #include <istream> 41:/usr/include/c++/4.8/iostream **** 42:/usr/include/c++/4.8/iostream **** namespace std _GLIBCXX_VISIBILITY(default) 43:/usr/include/c++/4.8/iostream **** { 44:/usr/include/c++/4.8/iostream **** _GLIBCXX_BEGIN_NAMESPACE_VERSION 45:/usr/include/c++/4.8/iostream **** 46:/usr/include/c++/4.8/iostream **** /** 47:/usr/include/c++/4.8/iostream **** * @name Standard Stream Objects 48:/usr/include/c++/4.8/iostream **** * 49:/usr/include/c++/4.8/iostream **** * The <iostream> header declares the eight <em>standard stream 50:/usr/include/c++/4.8/iostream **** * objects</em>. For other declarations, see 51:/usr/include/c++/4.8/iostream **** * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html 52:/usr/include/c++/4.8/iostream **** * and the @link iosfwd I/O forward declarations @endlink 53:/usr/include/c++/4.8/iostream **** * 54:/usr/include/c++/4.8/iostream **** * They are required by default to cooperate with the global C 55:/usr/include/c++/4.8/iostream **** * library's @c FILE streams, and to be available during program 56:/usr/include/c++/4.8/iostream **** * startup and termination. For more information, see the HOWTO 57:/usr/include/c++/4.8/iostream **** * linked to above. 58:/usr/include/c++/4.8/iostream **** */ 59:/usr/include/c++/4.8/iostream **** //@{ 60:/usr/include/c++/4.8/iostream **** extern istream cin; /// Linked to standard input 61:/usr/include/c++/4.8/iostream **** extern ostream cout; /// Linked to standard output 62:/usr/include/c++/4.8/iostream **** extern ostream cerr; /// Linked to standard error (unbuffered) 63:/usr/include/c++/4.8/iostream **** extern ostream clog; /// Linked to standard error (buffered) 64:/usr/include/c++/4.8/iostream **** 65:/usr/include/c++/4.8/iostream **** #ifdef _GLIBCXX_USE_WCHAR_T 66:/usr/include/c++/4.8/iostream **** extern wistream wcin; /// Linked to standard input 67:/usr/include/c++/4.8/iostream **** extern wostream wcout; /// Linked to standard output 68:/usr/include/c++/4.8/iostream **** extern wostream wcerr; /// Linked to standard error (unbuffered) 69:/usr/include/c++/4.8/iostream **** extern wostream wclog; /// Linked to standard error (buffered) 70:/usr/include/c++/4.8/iostream **** #endif 71:/usr/include/c++/4.8/iostream **** //@} GAS LISTING /tmp/ccQGxGDZ.s page 3 72:/usr/include/c++/4.8/iostream **** 73:/usr/include/c++/4.8/iostream **** // For construction of filebuffers for cout, cin, cerr, clog et. al. 74:/usr/include/c++/4.8/iostream **** static ios_base::Init __ioinit; 20 .loc 2 74 0 is_stmt 1 21 0011 BF000000 movl $_ZStL8__ioinit, %edi 21 00 22 .LVL1: 23 0016 E8000000 call _ZNSt8ios_base4InitC1Ev 23 00 24 .LVL2: 25 001b BA000000 movl $__dso_handle, %edx 25 00 26 0020 BE000000 movl $_ZStL8__ioinit, %esi 26 00 27 0025 BF000000 movl $_ZNSt8ios_base4InitD1Ev, %edi 27 00 28 002a E8000000 call __cxa_atexit 28 00 29 .LVL3: 30 .loc 1 24 0 31 002f 4883C408 addq $8, %rsp 32 .cfi_def_cfa_offset 8 33 .L5: 34 0033 C3 ret 35 .cfi_endproc 36 .LFE1400: 38 .globl _Z8someFuncRKiRKd 40 _Z8someFuncRKiRKd: 41 .LFB1243: 3:type-inference.cpp **** return v + d; 42 .loc 1 3 0 43 .cfi_startproc 44 .LVL4: 4:type-inference.cpp **** } 45 .loc 1 4 0 46 0034 F20F2A07 cvtsi2sd (%rdi), %xmm0 47 0038 F20F5806 addsd (%rsi), %xmm0 5:type-inference.cpp **** 48 .loc 1 5 0 49 003c C3 ret 50 .cfi_endproc 51 .LFE1243: 53 .section .rodata.str1.1,"aMS",@progbits,1 54 .LC1: 55 0000 74797065 .string "typeInference" 55 496E6665 55 72656E63 55 6500 56 .LC2: 57 000e 2000 .string " " 58 .text 59 .globl _Z13typeInferencev 61 _Z13typeInferencev: 62 .LFB1244: 7:type-inference.cpp **** 63 .loc 1 7 0 64 .cfi_startproc GAS LISTING /tmp/ccQGxGDZ.s page 4 65 003d 55 pushq %rbp 66 .cfi_def_cfa_offset 16 67 .cfi_offset 6, -16 68 003e 53 pushq %rbx 69 .cfi_def_cfa_offset 24 70 .cfi_offset 3, -24 71 003f 4883EC28 subq $40, %rsp 72 .cfi_def_cfa_offset 64 73 .LBB2: 9:type-inference.cpp **** 74 .loc 1 9 0 75 0043 C7442414 movl $12, 20(%rsp) 75 0C000000 11:type-inference.cpp **** 76 .loc 1 11 0 77 004b 48BB185D movabsq $4615370781758872856, %rbx 77 74D14517 77 0D40 78 0055 48895C24 movq %rbx, 24(%rsp) 78 18 13:type-inference.cpp **** 79 .loc 1 13 0 80 005a 488D7424 leaq 24(%rsp), %rsi 80 18 81 005f 488D7C24 leaq 20(%rsp), %rdi 81 14 82 0064 E8000000 call _Z8someFuncRKiRKd 82 00 83 .LVL5: 84 0069 F20F1144 movsd %xmm0, 8(%rsp) 84 2408 85 006f 488B6C24 movq 8(%rsp), %rbp 85 08 86 .LVL6: 15:type-inference.cpp **** 87 .loc 1 15 0 88 0074 BE000000 movl $.LC1, %esi 88 00 89 0079 BF000000 movl $_ZSt4cout, %edi 89 00 90 007e E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 90 00 91 .LVL7: 92 0083 BE0C0000 movl $12, %esi 92 00 93 0088 4889C7 movq %rax, %rdi 94 008b E8000000 call _ZNSolsEi 94 00 95 .LVL8: 96 0090 BE000000 movl $.LC2, %esi 96 00 97 0095 4889C7 movq %rax, %rdi 98 0098 E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 98 00 99 .LVL9: 100 009d 48895C24 movq %rbx, 8(%rsp) 100 08 GAS LISTING /tmp/ccQGxGDZ.s page 5 101 00a2 F20F1044 movsd 8(%rsp), %xmm0 101 2408 102 00a8 4889C7 movq %rax, %rdi 103 00ab E8000000 call _ZNSolsEd 103 00 104 .LVL10: 105 00b0 BE000000 movl $.LC2, %esi 105 00 106 00b5 4889C7 movq %rax, %rdi 107 00b8 E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 107 00 108 .LVL11: 109 00bd 48896C24 movq %rbp, 8(%rsp) 109 08 110 00c2 F20F1044 movsd 8(%rsp), %xmm0 110 2408 111 00c8 4889C7 movq %rax, %rdi 112 00cb E8000000 call _ZNSolsEd 112 00 113 .LVL12: 114 00d0 BE000000 movl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %esi 114 00 115 00d5 4889C7 movq %rax, %rdi 116 00d8 E8000000 call _ZNSolsEPFRSoS_E 116 00 117 .LVL13: 21:type-inference.cpp **** 118 .loc 1 21 0 119 00dd 488D7424 leaq 24(%rsp), %rsi 119 18 120 00e2 488D7C24 leaq 20(%rsp), %rdi 120 14 121 00e7 E8000000 call _Z8someFuncRKiRKd 121 00 122 .LVL14: 123 00ec F20F1144 movsd %xmm0, 8(%rsp) 123 2408 124 00f2 488B6C24 movq 8(%rsp), %rbp 124 08 125 .LVL15: 23:type-inference.cpp **** } 126 .loc 1 23 0 127 00f7 BE000000 movl $.LC1, %esi 127 00 128 00fc BF000000 movl $_ZSt4cout, %edi 128 00 129 0101 E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 129 00 130 .LVL16: 131 0106 BE0C0000 movl $12, %esi 131 00 132 010b 4889C7 movq %rax, %rdi 133 010e E8000000 call _ZNSolsEi 133 00 134 .LVL17: 135 0113 BE000000 movl $.LC2, %esi 135 00 GAS LISTING /tmp/ccQGxGDZ.s page 6 136 0118 4889C7 movq %rax, %rdi 137 011b E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 137 00 138 .LVL18: 139 0120 48895C24 movq %rbx, 8(%rsp) 139 08 140 0125 F20F1044 movsd 8(%rsp), %xmm0 140 2408 141 012b 4889C7 movq %rax, %rdi 142 012e E8000000 call _ZNSolsEd 142 00 143 .LVL19: 144 0133 BE000000 movl $.LC2, %esi 144 00 145 0138 4889C7 movq %rax, %rdi 146 013b E8000000 call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 146 00 147 .LVL20: 148 0140 48896C24 movq %rbp, 8(%rsp) 148 08 149 0145 F20F1044 movsd 8(%rsp), %xmm0 149 2408 150 014b 4889C7 movq %rax, %rdi 151 014e E8000000 call _ZNSolsEd 151 00 152 .LVL21: 153 0153 BE000000 movl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_, %esi 153 00 154 0158 4889C7 movq %rax, %rdi 155 015b E8000000 call _ZNSolsEPFRSoS_E 155 00 156 .LVL22: 157 .LBE2: 158 .loc 1 24 0 159 0160 4883C428 addq $40, %rsp 160 .cfi_def_cfa_offset 24 161 0164 5B popq %rbx 162 .cfi_def_cfa_offset 16 163 0165 5D popq %rbp 164 .cfi_def_cfa_offset 8 165 .LVL23: 166 0166 C3 ret 167 .cfi_endproc 168 .LFE1244: 171 _GLOBAL__sub_I__Z8someFuncRKiRKd: 172 .LFB1401: 173 .loc 1 24 0 174 .cfi_startproc 175 0167 4883EC08 subq $8, %rsp 176 .cfi_def_cfa_offset 16 177 .loc 1 24 0 178 016b BEFFFF00 movl $65535, %esi 178 00 179 0170 BF010000 movl $1, %edi 179 00 180 0175 E886FEFF call _Z41__static_initialization_and_destruction_0ii 180 FF GAS LISTING /tmp/ccQGxGDZ.s page 7 181 .LVL24: 182 017a 4883C408 addq $8, %rsp 183 .cfi_def_cfa_offset 8 184 017e C3 ret 185 .cfi_endproc 186 .LFE1401: 188 .section .init_array,"aw" 189 .align 8 190 0000 00000000 .quad _GLOBAL__sub_I__Z8someFuncRKiRKd 190 00000000 191 .local _ZStL8__ioinit 192 .comm _ZStL8__ioinit,1,1 193 .text 194 .Letext0: 195 .file 3 "/usr/include/libio.h" 196 .file 4 "/usr/include/stdio.h" 197 .file 5 "<built-in>" 198 .file 6 "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h" 199 .file 7 "/usr/include/wchar.h" 200 .file 8 "/usr/include/c++/4.8/cwchar" 201 .file 9 "/usr/include/c++/4.8/bits/exception_ptr.h" 202 .file 10 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h" 203 .file 11 "/usr/include/c++/4.8/bits/char_traits.h" 204 .file 12 "/usr/include/c++/4.8/cstdint" 205 .file 13 "/usr/include/c++/4.8/clocale" 206 .file 14 "/usr/include/c++/4.8/cstdlib" 207 .file 15 "/usr/include/c++/4.8/cstdio" 208 .file 16 "/usr/include/c++/4.8/bits/ios_base.h" 209 .file 17 "/usr/include/c++/4.8/cwctype" 210 .file 18 "/usr/include/c++/4.8/bits/ostream.tcc" 211 .file 19 "/usr/include/c++/4.8/ostream" 212 .file 20 "/usr/include/c++/4.8/iosfwd" 213 .file 21 "/usr/include/x86_64-linux-gnu/bits/wchar2.h" 214 .file 22 "/usr/include/time.h" 215 .file 23 "/usr/include/c++/4.8/ext/new_allocator.h" 216 .file 24 "/usr/include/c++/4.8/ext/numeric_traits.h" 217 .file 25 "/usr/include/c++/4.8/debug/debug.h" 218 .file 26 "/usr/include/stdint.h" 219 .file 27 "/usr/include/locale.h" 220 .file 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 221 .file 29 "/usr/include/x86_64-linux-gnu/c++/4.8/bits/atomic_word.h" 222 .file 30 "/usr/include/stdlib.h" 223 .file 31 "/usr/include/x86_64-linux-gnu/bits/stdlib.h" 224 .file 32 "/usr/include/_G_config.h" 225 .file 33 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 226 .file 34 "/usr/include/wctype.h" 227 .file 35 "/usr/include/c++/4.8/bits/stl_pair.h" GAS LISTING /tmp/ccQGxGDZ.s page 8 DEFINED SYMBOLS *ABS*:0000000000000000 type-inference.cpp /tmp/ccQGxGDZ.s:5 .text:0000000000000000 _Z41__static_initialization_and_destruction_0ii .bss:0000000000000000 _ZStL8__ioinit /tmp/ccQGxGDZ.s:40 .text:0000000000000034 _Z8someFuncRKiRKd /tmp/ccQGxGDZ.s:61 .text:000000000000003d _Z13typeInferencev /tmp/ccQGxGDZ.s:171 .text:0000000000000167 _GLOBAL__sub_I__Z8someFuncRKiRKd UNDEFINED SYMBOLS _ZNSt8ios_base4InitC1Ev __dso_handle _ZNSt8ios_base4InitD1Ev __cxa_atexit _ZSt4cout _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc _ZNSolsEi _ZNSolsEd _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ _ZNSolsEPFRSoS_E