Hi Robin,

>> Are the values inside the tables the problem? Or just some of the
>> helper functions/templates that interact with them to generate the
>> static data?
>> 
>> If the latter, then a rebuild of the files may not be necessary.
>
> I managed to get this to work without rebuilding the files.  After
> checking more carefully, it turned out that simpleIndex already does the
> right thing and only a few simple changes were necessary.
>
> Continuing with the phobos test suite failures I managed to fix some
> more problems.  I'm down to 32 failures now with the attached patch
> (single file this time).  It doesn't even seem that much now, debugging
> the failures took me longer than what the diff reflects :)
>
> An imho nasty (since unexpected) one was the implicit pointer cast from
> size_t* to int* during a foreach delegate (see aApply.d:_aApplycd2).  I
> did not check where exactly the cast happens but changing the int inside
> the foreach header to size_t fixed it.
>
> I also found some wrong POSIX defines and did not check all the others.
>  A more thorough check might be necessary in the future.
>
> The tests I did not yet check/fix are shared libphobos, math and
> numeric-related as well as some regex and curl tests.
>
> Any chance we will get some or most of the diff in before GCC 9?
> (provided they do not break anything else of course)  I'm going to be
> away for two weeks and will continue with the remaining failures afterwards.

I've applied the non-S/390 parts of the patch to move further along on
Solaris/SPARC (both 32 and 64-bit) since SPARC is another big-endian
target.  I immediately ran into two issues with your patch:

/vol/gcc/src/hg/trunk/solaris/libphobos/src/std/xml.d:2216:19: error: cannot 
implicitly convert expression (n) of type long to uint
 2216 |             s = s[n..$];
      |                   ^
/vol/gcc/src/hg/trunk/solaris/libphobos/src/std/xml.d:2254:23: error: cannot 
implicitly convert expression (n) of type long to uint
 2254 |         name = s[0 .. n];
      |                       ^
/vol/gcc/src/hg/trunk/solaris/libphobos/src/std/xml.d:2255:15: error: cannot 
implicitly convert expression (n) of type long to uint
 2255 |         s = s[n..$];
      |               ^

This will occur on any 32-bit target.  The following patch (using
ssize_t instead) allowed the code to compile:

diff --git a/libphobos/src/std/xml.d b/libphobos/src/std/xml.d
--- a/libphobos/src/std/xml.d
+++ b/libphobos/src/std/xml.d
@@ -2192,6 +2192,8 @@ private
         catch (Err e) { fail(e); }
     }
 
+    import core.sys.posix.sys.types : ssize_t;
+
     void checkChars(ref string s) @safe pure // rule 2
     {
         // TO DO - Fix std.utf stride and decode functions, then use those
@@ -2201,7 +2203,7 @@ private
         mixin Check!("Chars");
 
         dchar c;
-        long n = -1;
+        ssize_t n = -1;
         foreach (size_t i,dchar d; s)
         {
             if (!isChar(d))
@@ -2238,7 +2240,7 @@ private
         mixin Check!("Name");
 
         if (s.length == 0) fail();
-        long n;
+        ssize_t n;
 	// i must not be smaller than size_t because size_t is used internally
 	// in aApply.d and it will be cast e.g. to (int *) which fails on
 	// big-endian machines.
Another issue on 32-bit targets is

FAIL: gdc.dg/runnable.d   -O0  (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gdc.dg/runnable.d:923:13: error: 
function runnable.test186a (uint val) is not callable using argument types 
(long)

Again, this will occur on any 32-bit target.

Besides, you're quite inconsistent with the use of tab vs. blank in your
patch.  The D code uses only blanks as a rule, for example.

I've still got tons of execution failures with that augmented patch, but
those seem down to just a few root causes.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to