[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#892848: gcc-7: OpenMP support is broken on hppa in gcc-7 and earlier



Source: gcc-7
Severity: normal
Tags: patch

Dear Maintainer,

The 32-bit hppa architecture is one of a few callee-copies targets in gcc.
Objects larger than eight bytes are passed by invisible reference and the
callee is responsible to copy the object if necessary.

This results in a variety of differences in optimizing code from x86, etc.
In the case of OpenMP support, it is seriously broken handling objects
passed by invisible references and the problem is not easily fixed.
This is gcc PR middle-end/68733.

Helge Deller and I discussed the matter and decided the best way forward
was to switch the hppa ABI to caller copies as on x86.  This should also
help to eliminate various optimization bugs that are hidden due to limited
testing.

The attached patch has been installed in gcc-8.  We would appreciate your
installing this change in Debian gcc-6 and gcc-7 so others are not affected.

Regards,
Dave Anglin


-- System Information:
Debian Release: buster/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 4.14.25+ (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- no debconf information
2018-01-16  John David Anglin  <danglin@gcc.gnu.org>

	* config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
	copies.

Index: config.gcc
===================================================================
--- config.gcc	(revision 256716)
+++ config.gcc	(working copy)
@@ -1339,7 +1339,7 @@
 	gas=yes gnu_ld=yes
 	;;
 hppa*-*-linux*)
-	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
+	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
 		 pa/pa32-regs.h pa/pa32-linux.h"
 	tmake_file="${tmake_file} pa/t-linux"

Reply to: