<div>Hello,</div>
<div> </div>
<div> I tried to test the qualifier address_space so I used the example in the web site: <a href="http://clang.llvm.org/docs/LanguageExtensions.html#x86-specific">http://clang.llvm.org/docs/LanguageExtensions.html#x86-specific</a> </div>

<div> </div>
<div>I used <clang-cc + llvm-as + llc>, and I got the expected result; however, when I tried to generated the executable, I got the bellow error. </div>
<div> </div>
<div>Any idea that what can be wrong. </div>
<div> </div>
<div>Thanks in advance,</div>
<div> </div>
<div>Juan Carlos</div>
<div>
<div> </div>
<div>***************</div>
<div>*** Result ***</div></div>
<div>***************</div>
<div><a href="mailto:8@emperor:~/test$">~/test$</a> clang addrspace2.c -o addrspace2.exe -v<br>clang version 1.1 (trunk 83900)<br>Target: i386-pc-linux-gnu<br>Thread model: posix<br> "/home/jcmartin78/llvm/Debug/bin/clang-cc" -triple i386-pc-linux-gnu -S -disable-free -main-file-name addrspace2.c --relocation-model static --disable-fp-elim --unwind-tables=0 --mcpu=pentium4 --fmath-errno=1 -v -fexceptions=0 -fdiagnostics-show-option -o /tmp/cc-3YHq3X.s -x c addrspace2.c<br>
clang-cc version 1.1 based upon llvm 2.7svn hosted on i386-pc-linux-gnu<br>ignoring nonexistent directory "/System/Library/Frameworks"<br>ignoring nonexistent directory "/Library/Frameworks"<br>#include "..." search starts here:<br>
#include <...> search starts here:<br> /home/jcmartin78/llvm/Debug/lib/clang/1.1/include<br> /usr/local/include<br> /usr/include<br>End of search list.<br> "/usr/bin/gcc" -v -c -m32 -o /tmp/cc-Jp3bRb.o -x assembler /tmp/cc-3YHq3X.s<br>
Using built-in specs.<br>Target: i486-linux-gnu<br>Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu<br>
Thread model: posix<br>gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) <br>COLLECT_GCC_OPTIONS='-v' '-c' '-m32' '-o' '/tmp/cc-Jp3bRb.o' '-mtune=generic'<br> as -V -Qy --32 -o /tmp/cc-Jp3bRb.o /tmp/cc-3YHq3X.s<br>
GNU assembler version 2.19.1 (i486-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.19.1<br>COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/<br>
LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/<br>
COLLECT_GCC_OPTIONS='-v' '-c' '-m32' '-o' '/tmp/cc-Jp3bRb.o' '-mtune=generic'<br> "/usr/bin/gcc" -v -m32 -o addrspace2.exe /tmp/cc-Jp3bRb.o<br>Using built-in specs.<br>
Target: i486-linux-gnu<br>Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu<br>
Thread model: posix<br>gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) <br>COMPILER_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/<br>
LIBRARY_PATH=/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../:/lib/:/usr/lib/<br>
COLLECT_GCC_OPTIONS='-v' '-m32' '-o' 'addrspace2.exe' '-mtune=generic'<br> /usr/lib/gcc/i486-linux-gnu/4.3.3/collect2 --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 -o addrspace2.exe -z relro /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.3.3/crtbegin.o -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../.. /tmp/cc-Jp3bRb.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i486-linux-gnu/4.3.3/crtend.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crtn.o<br>
/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crt1.o: In function `_start':<br>/build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'<br>collect2: ld returned 1 exit status<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)</div>
<div>***************************<br><br></div>
<div class="gmail_quote">On Thu, Oct 15, 2009 at 3:47 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Please always reply to the cfe-dev mailing list. 
<div class="im"><br><br>On Oct 15, 2009, at 12:32 PM, Juan Carlos Martinez Santos wrote:<br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hello Douglas,<br><br>I see that clang support address space #256 and #257. What about others?<br></blockquote>
<br></div>Clang just passes the address space through to LLVM; it doesn't care what address space number you use. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">For the technical report I read that the address space is supported in C language because some architectures support multiple-spaces. Is x86 one of them?<br>
</blockquote><br></div>I don't know what happens to address spaces on x86. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">How I can specify customs address spaces? This parts bellows to the back-end, doesn't?<br></blockquote>
<br></div>Yes, it's all handled in the back-end. For custom address spaces, just use a different address space number.<br><br>       - Doug<br></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Juan Carlos<br>