pkgsrc/lang/gcc-aux/files/diff-gcc-testsuite
marino 723e097509 lang/gcc-aux: Fix c/c++ precision on FreeBSD/DragonFly
Until now, GCC builders had to choose between Ada and C/C++ on the
following platforms:

   i386-FreeBSD
   i386-DragonFly

On these platforms, depending on the value of the configuration macro
TARGET_96_ROUND_53_LONG_DOUBLE, either Ada precision or C/C++ long
double precision was broken.  The reason is that the floating point unit
of these platforms round off real-time calculations to 53-bit mantissas.
GCC will adjust accordingly to compensate.  Since a common backend is used
for all languages, one had to choice which language they wanted correct.

The solution is to break out the object file responsible for this from
the common backend library.  Ada now receives an altered version of
insn-modes.o, one that instructs the FPU not to round off the results.
This is all handled by patched Makefiles.

Other changes:
  - Configure DragonFly to add ".note.GNU-stack" section to assembly files
    to determine if program needs executable stacks
  - Skip 2 subtests of Wconversion-real on i386 FreeBSD and DragonFly.
    Due to the rounding behavior mentioned above, they fail to produce
    error messages as expected.  It's not possible to set target with
    xfail, and every target && target seems not work work.  So we will
    assume all gcc-aux platform targets are long-double capabile and
    just set xfail for x86 FreeBSD and DragonFly.
  - Rework Fortran large real test 2 to skip on x86_64 *BSD.  This test
    should pass on x86 machines.
  - Rework Fortran large real test 3 to be skipped when compiles with -O0
    only x86_64 machines.  All other combinations will pass.
  - Rename C format test typedef from quad_t to quad2_t.  DragonFly
    has a standard type called quad_t and the type conflict causes a
    large number of gcc tests to fail.
  - Add dummy dg-error line to avoid an assembly comparison tests on
    large files not built (test was marked as UNSUPPORTED but dejagnu is
    too dumb to know not to check for the tests' products.)
  - Reorder path passed during build when using an already-built gcc-aux
    compiler to build new compiler.  If gnat-aux is also installed, it
    would use the gnat* tools from that compiler rather than gcc-aux
    which results in build failure (different versions of tools are
    getting used together resulting in build failure).
2012-07-14 21:53:05 +00:00

46 lines
1.6 KiB
Text

--- gcc/testsuite/gcc.dg/pch/pch.exp.orig
+++ gcc/testsuite/gcc.dg/pch/pch.exp
@@ -44,6 +44,8 @@
set test "largefile.c"
set testh "largefile.hs"
set f [open $test w]
+puts $f "/* { dg-do run { target *-*-solaris* } } */"
+puts $f "/* { dg-error \"dummy\" \"fool dejagnu\" { target { ! *-*-solaris* } 20 } } */"
puts $f "/* { dg-timeout-factor 4.0 } */"
set v 0
for { set v 0 } { $v < 10000 } { incr v } {
--- gcc/testsuite/gcc.dg/format/ext-1.c.orig
+++ gcc/testsuite/gcc.dg/format/ext-1.c
@@ -8,7 +8,7 @@
#include "format.h"
void
-foo (quad_t q, u_quad_t uq, quad_t *qn, size_t z, size_t *zn, long long int ll,
+foo (quad2_t q, u_quad2_t uq, quad2_t *qn, size_t z, size_t *zn, long long int ll,
unsigned long long int ull, int i, unsigned int u, double d,
char *s, void *p, wchar_t *ls, wint_t lc, int *n, long int l)
{
--- gcc/testsuite/gcc.dg/format/ext-2.c.orig
+++ gcc/testsuite/gcc.dg/format/ext-2.c
@@ -8,7 +8,7 @@
#include "format.h"
void
-foo (quad_t *qp, u_quad_t *uqp, quad_t *qn, long long int *llp,
+foo (quad2_t *qp, u_quad2_t *uqp, quad2_t *qn, long long int *llp,
unsigned long long int *ullp, float *fp, char *s, void **pp, wchar_t *ls,
int *ip, unsigned int *up)
{
--- gcc/testsuite/gcc.dg/format/format.h.orig
+++ gcc/testsuite/gcc.dg/format/format.h
@@ -71,8 +71,8 @@
#endif
/* %q formats want a "quad"; GCC considers this to be a long long. */
-typedef llong quad_t;
-typedef ullong u_quad_t;
+typedef llong quad2_t;
+typedef ullong u_quad2_t;
__extension__ typedef __INTMAX_TYPE__ intmax_t;
__extension__ typedef __UINTMAX_TYPE__ uintmax_t;