Adriaan van Os wrote:
FAIL: chief41.pas ./chief41.pas: In function `Str2Charset': ./chief41.pas:6: internal compiler error: in hard_function_value, at explow.c:1541 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions. failed
Could you try the following patch (it fixed crash in cross-compiler). Only first hunk should matter on PPC, but other platform probably need the rest (at least AMD64 needs i386.c part). Apply to gcc tree, on top of gpc patch.
--- gcc-4.0.2/gcc/tree.h.bb 2006-03-27 23:38:33.761615272 +0200 +++ gcc-4.0.2/gcc/tree.h 2006-03-27 23:39:01.992323552 +0200 @@ -798,7 +798,8 @@ extern void tree_operand_check_failed (i
#define AGGREGATE_TYPE_P(TYPE) \ (TREE_CODE (TYPE) == ARRAY_TYPE || TREE_CODE (TYPE) == RECORD_TYPE \ - || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE) + || TREE_CODE (TYPE) == UNION_TYPE || TREE_CODE (TYPE) == QUAL_UNION_TYPE \ + || TREE_CODE (TYPE) == SET_TYPE)
/* Nonzero if TYPE represents a pointer or reference type. (It should be renamed to INDIRECT_TYPE_P.) Keep these checks in --- gcc-4.0.2.orig/gcc/config/ia64/ia64.c 2005-09-07 10:22:29.000000000 +0200 +++ gcc-4.0.2/gcc/config/ia64/ia64.c 2006-03-28 00:36:32.353788880 +0200 @@ -3467,6 +3467,7 @@ hfa_element_mode (tree type, bool nested case BOOLEAN_TYPE: case CHAR_TYPE: case POINTER_TYPE: case OFFSET_TYPE: case REFERENCE_TYPE: case METHOD_TYPE: case FILE_TYPE: case LANG_TYPE: case FUNCTION_TYPE: + case SET_TYPE: return VOIDmode;
/* Fortran complex types are supposed to be HFAs, so we need to handle --- gcc-4.0.2/gcc/config/sparc/sparc.c.bb 2006-03-28 00:39:54.492059192 +0200 +++ gcc-4.0.2/gcc/config/sparc/sparc.c 2006-03-28 00:39:59.122355280 +0200 @@ -7719,6 +7719,7 @@ sparc_type_code (register tree type) case CHAR_TYPE: /* GNU Pascal CHAR type. Not used in C. */ case BOOLEAN_TYPE: /* GNU Fortran BOOLEAN type. */ case FILE_TYPE: /* GNU Pascal FILE type. */ + case SET_TYPE: /* GNU Pascal SET type. */ case LANG_TYPE: /* ? */ return qualifiers;
--- gcc-4.0.2/gcc/config/i386/i386.c.bb 2006-03-28 00:32:36.297674864 +0200 +++ gcc-4.0.2/gcc/config/i386/i386.c 2006-03-28 00:34:39.741908488 +0200 @@ -2352,6 +2352,31 @@ classify_argument (enum machine_mode mod } } } + else if (TREE_CODE (type) == SET_TYPE) + { + if (bytes <= 4) + { + classes[0] = X86_64_INTEGERSI_CLASS; + return 1; + } + else if (bytes <= 8) + { + classes[0] = X86_64_INTEGER_CLASS; + return 1; + } + else if (bytes <= 12) + { + classes[0] = X86_64_INTEGER_CLASS; + classes[1] = X86_64_INTEGERSI_CLASS; + return 2; + } + else + { + classes[0] = X86_64_INTEGER_CLASS; + classes[1] = X86_64_INTEGER_CLASS; + return 2; + } + } else abort ();