From d826147859b1ed79a2dca4861aafe65532ab52ce Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 22 Feb 2016 12:48:19 +0100 Subject: open_issues/gcc: bd5bb665eb00598666a8162c2440410a51eb9e7e (2016-02-20) --- open_issues/gcc.mdwn | 403 ++++++++++++++++++++++++++++++++++++++++++++++--- open_issues/gccgo.mdwn | 109 ++++++++++++- open_issues/gnat.mdwn | 170 +++++++++++++++++++++ 3 files changed, 658 insertions(+), 24 deletions(-) (limited to 'open_issues') diff --git a/open_issues/gcc.mdwn b/open_issues/gcc.mdwn index 8fef7e7f..bf07de56 100644 --- a/open_issues/gcc.mdwn +++ b/open_issues/gcc.mdwn @@ -30,12 +30,12 @@ example. Especially all the compiler magic is all the same. git checkout reviewed git diff --patience --stat=$COLUMNS,$COLUMNS --patch --src-prefix=./ --dst-prefix=./ --word-diff --color --find-renames --ignore-space-change ..upstream/trunk | awk '/^(\x1b\[[0-9]+m)?diff/ { c = " " $0; } /^(\x1b\[[0-9]+m)?@@/ { print c; } { print; }' | less -i -/^---.*/([^.]*|.*\.texi.*|[^/]*gnu[^/]*|libgo/go/(net/sock_bsd\.go|syscall/exec_bsd\.go|syscall/libcall_posix\.go))$|hurd|linux|nacl|nptl|glibc($|[^x]|x[^x]|x$)|gs:|dg-runtest +/^---.*/([^.]*|.*\.texi.*|[^/]*gnu[^/]*|libgo/go/(net/sock_bsd\.go|syscall/exec_bsd\.go|syscall/libcall_posix\.go))$|hurd|linux|nacl|nptl|glibc($|[^x]|x[^x]|x$)|gs:|seg_gs|seg_tls --> Last reviewed up to the Git mirror's commit -c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). +bd5bb665eb00598666a8162c2440410a51eb9e7e (2016-02-20). has documentation for the `configure` switches. @@ -286,6 +286,20 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). [[!GCC_PR 57851 desc="[patch] unwinding via signal trampoline for kfreebsd*-gnu"]]. + * `unwind-dw2-fde-dip.c` + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ + && defined(TARGET_DL_ITERATE_PHDR) \ + {+&& defined(__linux__)+} + {+# define USE_PT_GNU_EH_FRAME+} + {+#endif+} + + {+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \+} + {+ && defined(TARGET_DL_ITERATE_PHDR) \+} + && (defined(__DragonFly__) || defined(__FreeBSD__)) + # define ElfW __ElfN + # define USE_PT_GNU_EH_FRAME + * `libitm` TODO: @@ -294,6 +308,167 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). * `liboffloadmic` + * `libgomp` + + * `testsuite/libgomp.c/affinity-1.c` + + * Check if linker supports -pie option with copy reloc + + diff --git ./gcc/configure.ac ./gcc/configure.ac + {+AC_MSG_CHECKING(linker PIE support with copy reloc)+} + {+gcc_cv_ld_pie_copyreloc=no+} + {+if test $gcc_cv_ld_pie = yes ; then+} + {+ if test $in_tree_ld = yes ; then+} + {+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 25 -o "$gcc_cv_gld_major_version" -gt 2; then+} + {+ gcc_cv_ld_pie_copyreloc=yes+} + {+ fi+} + {+ elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then+} + {+ # Check if linker supports -pie option with copy reloc+} + {+ case "$target" in+} + {+ i?86-*-linux* | x86_64-*-linux*)+} + {+[...]+} + + diff --git ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c + diff --git ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c + diff --git ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-3.c ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-3.c + diff --git ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-4.c ./gcc/testsuite/gcc.target/i386/pie-copyrelocs-4.c + @@ -0,0 +1,14 @@ + {+/* [...] */+} + {+/* { dg-do compile { target *-*-linux* } } */+} + {+/* { dg-require-effective-target pie_copyreloc } */+} + {+/* { dg-options "-O2 -fpie" } */+} + + -checking linker PIE support with copy reloc... yes + +checking linker PIE support with copy reloc... no + + * Testsuite + + diff --git ./gcc/testsuite/gcc.target/i386/pr65248-1.c ./gcc/testsuite/gcc.target/i386/pr65248-1.c + diff --git ./gcc/testsuite/gcc.target/i386/pr65248-2.c ./gcc/testsuite/gcc.target/i386/pr65248-2.c + diff --git ./gcc/testsuite/gcc.target/i386/pr65248-3.c ./gcc/testsuite/gcc.target/i386/pr65248-3.c + diff --git ./gcc/testsuite/gcc.target/i386/pr65248-4.c ./gcc/testsuite/gcc.target/i386/pr65248-4.c + diff --git ./gcc/testsuite/gcc.target/i386/pr67215-1.c ./gcc/testsuite/gcc.target/i386/pr67215-1.c + diff --git ./gcc/testsuite/gcc.target/i386/pr67215-2.c ./gcc/testsuite/gcc.target/i386/pr67215-2.c + diff --git ./gcc/testsuite/gcc.target/i386/pr67215-3.c ./gcc/testsuite/gcc.target/i386/pr67215-3.c + @@ -0,0 +1,17 @@ + {+/* { dg-do compile { target *-*-linux* } } */+} + {+/* { dg-options "-O2 -fpic" } */+} + + diff --git ./gcc/testsuite/gcc.target/i386/pr32219-9.c ./gcc/testsuite/gcc.target/i386/pr32219-9.c + @@ -0,0 +1,16 @@ + {+/* { dg-do compile { target *-*-linux* } } */+} + {+/* { dg-options "-O2 -fpie" } */+} + + diff --git ./gcc/testsuite/gcc.target/i386/pr63495.c ./gcc/testsuite/gcc.target/i386/pr63495.c + @@ -0,0 +1,6 @@ + {+/* PR c/63495 */+} + {+/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */+} + + +++ ./gcc/testsuite/gcc.target/i386/pr66232-1.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-2.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-3.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-4.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-6.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-7.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-8.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-9.c + @@ -0,0 +1,13 @@ + {+/* { dg-do compile { target *-*-linux* } } */+} + + gcc/testsuite/c-c++-common/pr37743.c + gcc/testsuite/gcc.dg/iec-559-macros-9.c + gcc/testsuite/gcc.dg/pg-override.c + gcc/testsuite/gcc.dg/pg.c + gcc/testsuite/gcc.target/i386/fentry-override.c + gcc/testsuite/gcc.target/i386/fentry.c + gcc/testsuite/gcc.target/i386/struct-size.c + Linux? + + libstdc++-v3/testsuite/21_strings/c_strings/char/69626.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc + libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc + libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc + libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc + libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc + libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc + libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc + libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/2.cc + libstdc++-v3/testsuite/30_threads/shared_timed_mutex/cons/1.cc + libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/1.cc + libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/2.cc + libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/3.cc + libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc + libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc + libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc + Linux? + + diff --git ./gcc/testsuite/gcc.dg/tm/memopt-15.c ./gcc/testsuite/gcc.dg/tm/memopt-15.c + @@ -1,4 +1,4 @@ + /* { dg-do compile { target { {+i?86-*-linux*+} x86_64-*-linux* } } } */ + /* { dg-options "-fgnu-tm -O" } */ + + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-1.c ./gcc/testsuite/gcc.target/i386/pr61296-1.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-2.c ./gcc/testsuite/gcc.target/i386/pr61296-2.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-3.c ./gcc/testsuite/gcc.target/i386/pr61296-3.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-4.c ./gcc/testsuite/gcc.target/i386/pr61296-4.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-5.c ./gcc/testsuite/gcc.target/i386/pr61296-5.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-6.c ./gcc/testsuite/gcc.target/i386/pr61296-6.c + diff --git ./gcc/testsuite/gcc.target/i386/pr61296-7.c ./gcc/testsuite/gcc.target/i386/pr61296-7.c + @@ -0,0 +1,27 @@ + {+/* PR target/61296 */+} + {+/* { dg-do compile { target { *-*-linux* } } } */+} + + gcc/testsuite/gcc.target/i386/mcount_pic.c + gcc/testsuite/gcc.target/i386/nop-mcount.c + gcc/testsuite/gcc.target/i386/record-mcount.c + Linux? + + --- /dev/null + +++ ./gcc/testsuite/gcc.dg/fdata-sections-2.c + diff --git ./gcc/testsuite/gcc.dg/fdata-sections-2.c ./gcc/testsuite/gcc.dg/fdata-sections-2.c + @@ -0,0 +1,18 @@ + {+/* { dg-do compile { target *-*-linux* } } */+} + + --- /dev/null + +++ ./gcc/testsuite/gcc.target/i386/noplt-1.c + +++ ./gcc/testsuite/gcc.target/i386/noplt-2.c + +++ ./gcc/testsuite/gcc.target/i386/noplt-3.c + +++ ./gcc/testsuite/gcc.target/i386/noplt-4.c + +++ ./gcc/testsuite/gcc.target/i386/pr66275.c + +++ ./gcc/testsuite/gcc.target/i386/pr68018.c + {+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */+} + + --- /dev/null + +++ ./gcc/testsuite/gcc.target/i386/pr68937-1.c + +++ ./gcc/testsuite/gcc.target/i386/pr68937-2.c + +++ ./gcc/testsuite/gcc.target/i386/pr68937-3.c + +++ ./gcc/testsuite/gcc.target/i386/pr68937-4.c + +++ ./gcc/testsuite/gcc.target/i386/pr68937-5.c + +++ ./gcc/testsuite/gcc.target/i386/pr68937-6.c + {+/* { dg-do compile { target { *-*-linux* && ia32 } } } */+} + {+/* { dg-options "-O2 -fpic -fno-plt -mregparm=3" } */+} + + --- /dev/null + +++ ./gcc/testsuite/gcc.target/i386/pr66232-10.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-11.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-12.c + +++ ./gcc/testsuite/gcc.target/i386/pr66232-13.c + {+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */+} + {+/* { dg-require-effective-target maybe_x32 } */+} + {+/* { dg-options "-O2 -mx32 -fpic -fno-plt -maddress-mode=long" } */+} + + diff --git ./gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp ./gcc/testsuite/gcc.target/i386/iamcu/abi-iamcu.exp + @@ -0,0 +1,42 @@ + {+[...]+} + {+if { (![istarget x86_64-*-linux*] && ![istarget i?86-*-linux*])+} + {+ || ![is-effective-target ia32] } then {+} + {+ return+} + {+}+} + * `hurd/usr` `NATIVE_SYSTEM_HEADER_DIR`, `638454a19c1c08f01c10517bc72a114250fc4f33`, @@ -390,6 +565,61 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). * Might `-fsplit-stack` be useful for us with respect to our [[multithreaded|multithreading]] libraries? + * -fsplit-stack issue in context of [[gccgo]] + + mmap errno 1073741846 + fatal error: mmap + + Temporary breakpoint 3 at 0x80490fd + Starting program: /media/erich/home/thomas/tmp/gcc/t/hurd/go.build/gcc/testsuite/go/array-2.x + [New Thread 732.20] + + Breakpoint 2, backtrace_alloc (state=, state@entry=0x21ffa08, size=size@entry=40, error_callback=, error_callback@entry=0x12c4970 , data=, data@entry=0x0) + at ../../../go/libbacktrace/mmap.c:140 + 140 page = mmap (NULL, asksize, PROT_READ | PROT_WRITE, + (gdb) info threads + Id Target Id Frame + 5 Thread 732.20 0x01dedafc in mach_msg_trap () at /usr/src/eglibc-2.17/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2 + * 4 Thread 732.19 backtrace_alloc (state=, state@entry=0x21ffa08, size=size@entry=40, error_callback=, error_callback@entry=0x12c4970 , data=, data@entry=0x0) + at ../../../go/libbacktrace/mmap.c:140 + (gdb) set *(int *)0x21ff930 = 123 + (gdb) call __vm_allocate(1,0x21ff930,4096,1) + $20 = 0 + (gdb) print/x *(int *)0x21ff930 + $21 = 0x0 + (gdb) call __vm_allocate(1,0x21ff930,4096,1) + $22 = 0 + (gdb) print/x *(int *)0x21ff930 + $23 = 0x7d000 + (gdb) call __vm_allocate(1,0x21ff930,4096,1) + $24 = 0 + (gdb) print/x *(int *)0x21ff930 + $25 = 0x7e000 + + $ cat < v.c + #include + #include + + int main(void) + { + int err; + vm_address_t addr = 0; + + int i; + for (i = 0; i < 3; ++i) + { + err = vm_allocate(mach_task_self(), &addr, 4096, 1); + printf("%u %p\n", err, (void *) addr); + } + + return 0; + } + $ gcc -Wall v.c -fsplit-stack + $ ./a.out + 0 (nil) + 0 0x102c000 + 0 0x102e000 + * `gcc/ada` (not all reviewed) * [[Ada (GNAT)|gnat]] support is work in progress. @@ -399,6 +629,7 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). * The [[Google Go's libgo|gccgo]] (introduced in e440a3286bc89368b8d3a8fd6accd47191790bf2 (2010-12-03)) needs OS configuration / support. + See [[gccgo]]. * `--enable-frame-pointer` @@ -620,6 +851,25 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). "20110609002620.GA16719@const.famille.thibault.fr"]]. commit 026e608ecebcb2a6193971006a85276307d79b00. + * Does this make sense for us? + + diff --git ./libstdc++-v3/include/std/thread ./libstdc++-v3/include/std/thread + @@ -269,7 +279,18 @@ _GLIBCXX_END_NAMESPACE_VERSION + /// get_id + inline thread::id + get_id() noexcept + { + {+#ifdef __GLIBC__+} + {+ // For the GNU C library pthread_self() is usable without linking to+} + {+ // libpthread.so but returns 0, so we cannot use it in single-threaded+} + {+ // programs, because this_thread::get_id() != thread::id{} must be true.+} + {+ // We know that pthread_t is an integral type in the GNU C library.+} + {+ if (!__gthread_active_p())+} + {+ return thread::id(1);+} + {+#endif+} + return thread::id(__gthread_self()); + } + * [[`libsanitizer`|_san]] (not reviewed) A lot of Linux-specific things. @@ -636,8 +886,6 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). * `libvtv/vtv_rts.cc`: `/proc/self/exe` usage, `PATH_MAX`. - * ./libgomp/testsuite/libgomp.c/affinity-1.c Linux usage - * `libcilkrts` Disabled for Hurd. @@ -765,13 +1013,55 @@ c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19). * Debian GCC 48594516135e34a726cafe3863a4dc661bbd61a4 `boehm-gc: use anonymous mmap instead of brk also on hurd-*.`. [[!debbug 753791]]. + * [low] `libmpx` + + Only enabled for GNU/Linux, but actually seems to be portable. + + gcc/config/i386/linux-common.h:MPX_SPEC + + * `PIE_SPEC` + + diff --git ./gcc/config/gnu-user.h ./gcc/config/gnu-user.h + @@ -42,8 +42,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #if defined HAVE_LD_PIE + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: [-%{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}-]{+%{pg|p|profile:gcrt1.o%s;: \+} + {+ %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}}+} \ + crti.o%s [-%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}-]{+%{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \+} + {+ %{" PIE_SPEC ":crtbeginS.o%s} \+} + {+ %{" NO_PIE_SPEC ":crtbegin.o%s}}+} \ + + * `%gs:` + + diff --git ./gcc/config/i386/i386.c ./gcc/config/i386/i386.c + @@ -22879,10 +22887,50 @@ ix86_split_long_move (rtx operands[]) + if (GET_MODE (base) != Pmode) + base = gen_rtx_REG (Pmode, REGNO (base)); + + {+addr = XEXP (part[1][0], 0);+} + {+ if (TARGET_TLS_DIRECT_SEG_REFS)+} + {+ {+} + {+ struct ix86_address parts;+} + {+ int ok = ix86_decompose_address (addr, &parts);+} + {+ gcc_assert (ok);+} + {+ if (parts.seg == DEFAULT_TLS_SEG_REG)+} + {+ {+} + {+ /* It is not valid to use %gs: or %fs: in+} + {+ lea though, so we need to remove it from the+} + {+ address used for lea and add it to each individual+} + {+ memory loads instead. */+} + [...] + + * x86 Named Address Spaces, `i386: Add address spaces for fs/gs segments and + tls`, commit 716c563bcef8bb91dee230dbc75abff70ed2f6ae. + # Build Here's a log of a GCC build run; this is from Git commit -c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19), with -b68b3d9d07b2e31cc592ef231a6b963192ae81b6 cherry-picked on laplace.SCHWINGE, run -on kepler.SCHWINGE and laplace.SCHWINGE. +bd5bb665eb00598666a8162c2440410a51eb9e7e (2016-02-20), run on kepler.SCHWINGE +and laplace.SCHWINGE. $ export LC_ALL=C $ (cd ../master/ && contrib/gcc_update --touch) @@ -787,8 +1077,8 @@ harmonized. `/include` for GNU Hurd. Explicit `--enable-multiarch` because *auto check [is disabled if] configured with --native-system-header-dir*. -This takes up around 4.3 GiB, and runs for [[4 h 37 min|performance#measure]] -on kepler.SCHWINGE and [[3 h 42 min|performance#measure]] on laplace.SCHWINGE. +This takes up around 4.8 GiB, and runs for [[5 h 0 min|performance#measure]] +on kepler.SCHWINGE and [[5 h 18 min|performance#measure]] on laplace.SCHWINGE.