rpms/gcc/devel gcc4-gfortran-entry.patch, NONE, 1.1 gcc4-gfortran-namelist.patch, NONE, 1.1 gcc4-java-awt-thread-init.patch, NONE, 1.1 gcc4-java-x509-extension.patch, NONE, 1.1 .cvsignore, 1.85, 1.86 gcc4-pr20490.patch, 1.2, 1.3 gcc4-pr20768.patch, 1.2, 1.3 gcc4-struct-layout.patch, 1.1, 1.2 gcc4.spec, 1.32, 1.33 sources, 1.87, 1.88 gcc4-gfortran-entry-character.patch, 1.1, NONE gcc4-gfortran-pr13082-mixed.patch, 1.1, NONE gcc4-gfortran-pr13082.patch, 1.1, NONE gcc4-gfortran-pr18824.patch, 1.1, NONE gcc4-pr20991.patch, 1.1, NONE gcc4-pr21099.patch, 1.1, NONE gcc4-pr21102.patch, 1.1, NONE gcc4-pr21173.patch, 1.2, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Apr 28 17:32:54 UTC 2005
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10578
Modified Files:
.cvsignore gcc4-pr20490.patch gcc4-pr20768.patch
gcc4-struct-layout.patch gcc4.spec sources
Added Files:
gcc4-gfortran-entry.patch gcc4-gfortran-namelist.patch
gcc4-java-awt-thread-init.patch gcc4-java-x509-extension.patch
Removed Files:
gcc4-gfortran-entry-character.patch
gcc4-gfortran-pr13082-mixed.patch gcc4-gfortran-pr13082.patch
gcc4-gfortran-pr18824.patch gcc4-pr20991.patch
gcc4-pr21099.patch gcc4-pr21102.patch gcc4-pr21173.patch
Log Message:
4.0.0-2
gcc4-gfortran-entry.patch:
fortran/decl.c | 5
fortran/gfortran.h | 3
fortran/resolve.c | 83 +++++++++
fortran/trans-array.c | 2
fortran/trans-decl.c | 150 +++++++++++++++--
fortran/trans-expr.c | 42 +++-
fortran/trans-types.c | 46 +++++
fortran/trans.h | 3
testsuite/gfortran.dg/entry_3.f90 | 28 +++
testsuite/gfortran.fortran-torture/execute/entry_1.f90 | 74 ++++++++
testsuite/gfortran.fortran-torture/execute/entry_2.f90 | 51 +++++
testsuite/gfortran.fortran-torture/execute/entry_3.f90 | 40 ++++
testsuite/gfortran.fortran-torture/execute/entry_4.f90 | 64 +++++++
testsuite/gfortran.fortran-torture/execute/entry_5.f90 | 51 +++++
testsuite/gfortran.fortran-torture/execute/entry_6.f90 | 109 ++++++++++++
testsuite/gfortran.fortran-torture/execute/entry_7.f90 | 106 ++++++++++++
testsuite/gfortran.fortran-torture/execute/entry_8.f90 | 24 ++
17 files changed, 853 insertions(+), 28 deletions(-)
--- NEW FILE gcc4-gfortran-entry.patch ---
2005-04-28 Jakub Jelinek <jakub at redhat.com>
PR fortran/13082
PR fortran/18824
* trans.h (current_function_namespace): Declare.
* trans-expr.c (gfc_conv_variable): Handle return values in functions
with alternate entry points.
* resolve.c (resolve_entries): Remove unnecessary string termination
after snprintf. Set result of entry master.
If all entries have the same type, set entry master's type
to that common type, otherwise set mixed_entry_master attribute.
* trans-types.c (gfc_get_mixed_entry_union): New function.
(gfc_get_function_type): Use it for mixed_entry_master functions.
* gfortran.h (symbol_attribute): Add mixed_entry_master bit.
* decl.c (gfc_match_entry): Set entry->result properly for
function ENTRY.
* trans-decl.c (current_function_namespace): New global variable.
(gfc_get_symbol_decl): For entry_master, skip over __entry argument.
(build_entry_thunks): Save, set and restore
current_function_namespace. Handle return values in entry
thunks. Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
shared between multiple contexts.
(gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
current_function_decl instead of sym->backend_decl. Skip over
entry master's entry id argument. For mixed_entry_master entries or
their results, return a COMPONENT_REF of the fake result.
(gfc_trans_deferred_vars): Don't warn about missing return value if
at least one entry point uses RESULT.
(gfc_generate_function_code): Save, set and restore
current_function_namespace. For entry master returning
CHARACTER, copy ts.cl->backend_decl to all entry result syms.
* trans-array.c (gfc_trans_dummy_array_bias): Don't set OPTIONAL_ARG
just because in entry_master.
* gfortran.dg/entry_3.f90: New test.
* gfortran.fortran-torture/execute/entry_1.f90: New test.
* gfortran.fortran-torture/execute/entry_2.f90: New test.
* gfortran.fortran-torture/execute/entry_3.f90: New test.
* gfortran.fortran-torture/execute/entry_4.f90: New test.
* gfortran.fortran-torture/execute/entry_5.f90: New test.
* gfortran.fortran-torture/execute/entry_6.f90: New test.
* gfortran.fortran-torture/execute/entry_7.f90: New test.
2005-04-28 Tobias Schl"uter <tobias.schlueter at physik.uni-muenchen.de>
* gfortran.fortran-torture/execute/entry_8.f90: New test.
--- gcc/fortran/trans.h.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/trans.h 2005-04-25 12:39:04.000000000 +0200
@@ -419,6 +419,9 @@ void gfc_get_backend_locus (locus *);
extern GTY(()) tree gfc_static_ctors;
void gfc_generate_constructors (void);
+/* The namespace of the current function. */
+extern gfc_namespace *current_function_namespace;
+
/* Generate a runtime error check. */
void gfc_trans_runtime_check (tree, tree, stmtblock_t *);
--- gcc/fortran/trans-expr.c.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/trans-expr.c 2005-04-25 13:21:00.000000000 +0200
@@ -308,11 +308,41 @@ gfc_conv_variable (gfc_se * se, gfc_expr
}
else
{
+ tree se_expr = NULL_TREE;
+
se->expr = gfc_get_symbol_decl (sym);
+ /* Special case for assigning the return value of a function.
+ Self recursive functions must have an explicit return value. */
+ if (se->expr == current_function_decl && sym->attr.function
+ && (sym->result == sym))
+ se_expr = gfc_get_fake_result_decl (sym);
+
+ /* Similarly for alternate entry points. */
+ else if (sym->attr.function && sym->attr.entry
+ && (sym->result == sym) && current_function_namespace)
+ {
+ gfc_entry_list *el = NULL;
+
+ for (el = current_function_namespace->entries; el; el = el->next)
+ if (sym == el->sym)
+ {
+ se_expr = gfc_get_fake_result_decl (sym);
+ break;
+ }
+ }
+
+ else if (sym->attr.result && current_function_namespace
+ && current_function_namespace->proc_name->attr.entry_master
+ && !gfc_return_by_reference (current_function_namespace->proc_name))
+ se_expr = gfc_get_fake_result_decl (sym);
+
+ if (se_expr)
+ se->expr = se_expr;
+
/* Procedure actual arguments. */
- if (sym->attr.flavor == FL_PROCEDURE
- && se->expr != current_function_decl)
+ else if (sym->attr.flavor == FL_PROCEDURE
+ && se->expr != current_function_decl)
{
gcc_assert (se->want_pointer);
if (!sym->attr.dummy)
@@ -323,14 +353,6 @@ gfc_conv_variable (gfc_se * se, gfc_expr
return;
}
- /* Special case for assigning the return value of a function.
- Self recursive functions must have an explicit return value. */
- if (se->expr == current_function_decl && sym->attr.function
- && (sym->result == sym))
- {
- se->expr = gfc_get_fake_result_decl (sym);
- }
-
/* Dereference scalar dummy variables. */
if (sym->attr.dummy
&& sym->ts.type != BT_CHARACTER
--- gcc/fortran/resolve.c.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/resolve.c 2005-04-26 11:06:32.000000000 +0200
@@ -360,7 +360,6 @@ resolve_entries (gfc_namespace * ns)
out what is going on. */
snprintf (name, GFC_MAX_SYMBOL_LEN, "master.%d.%s",
master_count++, ns->proc_name->name);
- name[GFC_MAX_SYMBOL_LEN] = '\0';
gfc_get_ha_symbol (name, &proc);
gcc_assert (proc != NULL);
@@ -369,8 +368,88 @@ resolve_entries (gfc_namespace * ns)
gfc_add_subroutine (&proc->attr, proc->name, NULL);
else
{
+ gfc_symbol *sym;
+ gfc_typespec *ts, *fts;
+
gfc_add_function (&proc->attr, proc->name, NULL);
- gfc_internal_error ("TODO: Functions with alternate entry points");
+ proc->result = proc;
+ fts = &ns->entries->sym->result->ts;
+ if (fts->type == BT_UNKNOWN)
+ fts = gfc_get_default_type (ns->entries->sym->result, NULL);
+ for (el = ns->entries->next; el; el = el->next)
+ {
+ ts = &el->sym->result->ts;
+ if (ts->type == BT_UNKNOWN)
+ ts = gfc_get_default_type (el->sym->result, NULL);
+ if (! gfc_compare_types (ts, fts)
+ || (el->sym->result->attr.dimension
+ != ns->entries->sym->result->attr.dimension)
+ || (el->sym->result->attr.pointer
+ != ns->entries->sym->result->attr.pointer))
+ break;
+ }
+
+ if (el == NULL)
+ {
+ sym = ns->entries->sym->result;
+ /* All result types the same. */
+ proc->ts = *fts;
+ if (sym->attr.dimension)
+ gfc_set_array_spec (proc, gfc_copy_array_spec (sym->as), NULL);
+ if (sym->attr.pointer)
+ gfc_add_pointer (&proc->attr, NULL);
+ }
+ else
+ {
+ /* Otherwise the result will be passed through an union by
+ reference. */
+ proc->attr.mixed_entry_master = 1;
+ for (el = ns->entries; el; el = el->next)
+ {
+ sym = el->sym->result;
+ if (sym->attr.dimension)
+ gfc_error ("%s result %s can't be an array in FUNCTION %s at %L",
+ el == ns->entries ? "FUNCTION" : "ENTRY", sym->name,
+ ns->entries->sym->name, &sym->declared_at);
+ else if (sym->attr.pointer)
+ gfc_error ("%s result %s can't be a POINTER in FUNCTION %s at %L",
+ el == ns->entries ? "FUNCTION" : "ENTRY", sym->name,
+ ns->entries->sym->name, &sym->declared_at);
+ else
+ {
+ ts = &sym->ts;
+ if (ts->type == BT_UNKNOWN)
+ ts = gfc_get_default_type (sym, NULL);
+ switch (ts->type)
+ {
+ case BT_INTEGER:
+ if (ts->kind == gfc_default_integer_kind)
+ sym = NULL;
+ break;
+ case BT_REAL:
+ if (ts->kind == gfc_default_real_kind
+ || ts->kind == gfc_default_double_kind)
+ sym = NULL;
+ break;
+ case BT_COMPLEX:
+ if (ts->kind == gfc_default_complex_kind)
+ sym = NULL;
+ break;
+ case BT_LOGICAL:
+ if (ts->kind == gfc_default_logical_kind)
+ sym = NULL;
+ break;
+ default:
+ break;
+ }
+ if (sym)
+ gfc_error ("%s result %s can't be of type %s in FUNCTION %s at %L",
+ el == ns->entries ? "FUNCTION" : "ENTRY", sym->name,
+ gfc_typename (ts), ns->entries->sym->name,
+ &sym->declared_at);
+ }
+ }
+ }
}
proc->attr.access = ACCESS_PRIVATE;
proc->attr.entry_master = 1;
--- gcc/fortran/trans-types.c.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/trans-types.c 2005-04-25 12:39:04.000000000 +0200
@@ -1469,6 +1469,50 @@ gfc_return_by_reference (gfc_symbol * sy
return 0;
}
+static tree
+gfc_get_mixed_entry_union (gfc_namespace *ns)
+{
+ tree type;
+ tree decl;
+ tree fieldlist;
+ char name[GFC_MAX_SYMBOL_LEN + 1];
+ gfc_entry_list *el, *el2;
+
+ gcc_assert (ns->proc_name->attr.mixed_entry_master);
+ gcc_assert (memcmp (ns->proc_name->name, "master.", 7) == 0);
+
+ snprintf (name, GFC_MAX_SYMBOL_LEN, "munion.%s", ns->proc_name->name + 7);
+
+ /* Build the type node. */
+ type = make_node (UNION_TYPE);
+
+ TYPE_NAME (type) = get_identifier (name);
+ fieldlist = NULL;
+
+ for (el = ns->entries; el; el = el->next)
+ {
+ /* Search for duplicates. */
+ for (el2 = ns->entries; el2 != el; el2 = el2->next)
+ if (el2->sym->result == el->sym->result)
+ break;
+
+ if (el == el2)
+ {
+ decl = build_decl (FIELD_DECL,
+ get_identifier (el->sym->result->name),
+ gfc_sym_type (el->sym->result));
+ DECL_CONTEXT (decl) = type;
+ fieldlist = chainon (fieldlist, decl);
+ }
+ }
+
+ /* Finish off the type. */
+ TYPE_FIELDS (type) = fieldlist;
+
+ gfc_finish_type (type);
+ return type;
+}
+
tree
gfc_get_function_type (gfc_symbol * sym)
{
@@ -1571,6 +1615,8 @@ gfc_get_function_type (gfc_symbol * sym)
type = integer_type_node;
else if (!sym->attr.function || gfc_return_by_reference (sym))
type = void_type_node;
+ else if (sym->attr.mixed_entry_master)
+ type = gfc_get_mixed_entry_union (sym->ns);
else
type = gfc_sym_type (sym);
--- gcc/fortran/gfortran.h.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/gfortran.h 2005-04-25 12:39:04.000000000 +0200
@@ -431,6 +431,9 @@ typedef struct
/* Set if this is the master function for a procedure with multiple
entry points. */
unsigned entry_master:1;
+ /* Set if this is the master function for a function with multiple
+ entry points where characteristics of the entry points differ. */
+ unsigned mixed_entry_master:1;
/* Set if a function must always be referenced by an explicit interface. */
unsigned always_explicit:1;
--- gcc/fortran/decl.c.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/decl.c 2005-04-25 12:39:04.000000000 +0200
@@ -2407,8 +2407,7 @@ gfc_match_entry (void)
|| gfc_add_function (&entry->attr, entry->name, NULL) == FAILURE)
return MATCH_ERROR;
- entry->result = proc->result;
-
+ entry->result = entry;
}
else
{
@@ -2423,6 +2422,8 @@ gfc_match_entry (void)
|| gfc_add_function (&entry->attr, result->name,
NULL) == FAILURE)
return MATCH_ERROR;
+
+ entry->result = result;
}
if (proc->attr.recursive && result == NULL)
--- gcc/fortran/trans-decl.c.jj 2005-04-25 12:18:03.000000000 +0200
+++ gcc/fortran/trans-decl.c 2005-04-25 14:00:26.000000000 +0200
@@ -65,6 +65,11 @@ static GTY(()) tree saved_parent_functio
static gfc_namespace *module_namespace;
+/* The namespace of the current function. */
+
+gfc_namespace *current_function_namespace;
+
+
/* List of static constructor functions. */
tree gfc_static_ctors;
@@ -736,6 +741,10 @@ gfc_get_symbol_decl (gfc_symbol * sym)
{
sym->backend_decl =
DECL_ARGUMENTS (sym->ns->proc_name->backend_decl);
+ /* For entry master function skip over the __entry
+ argument. */
+ if (sym->ns->proc_name->attr.entry_master)
+ sym->backend_decl = TREE_CHAIN (sym->backend_decl);
}
/* Dummy variables should already have been created. */
@@ -1348,10 +1357,14 @@ build_entry_thunks (gfc_namespace * ns)
tree string_args;
tree tmp;
locus old_loc;
+ gfc_namespace *old_ns;
/* This should always be a toplevel function. */
gcc_assert (current_function_decl == NULL_TREE);
+ old_ns = current_function_namespace;
+ current_function_namespace = ns;
+
gfc_get_backend_locus (&old_loc);
for (el = ns->entries; el; el = el->next)
{
@@ -1371,12 +1384,24 @@ build_entry_thunks (gfc_namespace * ns)
args = tree_cons (NULL_TREE, tmp, NULL_TREE);
string_args = NULL_TREE;
- /* TODO: Pass return by reference parameters. */
- if (ns->proc_name->attr.function)
- gfc_todo_error ("Functons with multiple entry points");
-
+ if (thunk_sym->attr.function)
+ {
+ if (gfc_return_by_reference (ns->proc_name))
+ {
+ tree ref = DECL_ARGUMENTS (current_function_decl);
+ args = tree_cons (NULL_TREE, ref, args);
+ if (ns->proc_name->ts.type == BT_CHARACTER)
+ args = tree_cons (NULL_TREE, TREE_CHAIN (ref),
+ args);
+ }
+ }
+
for (formal = ns->proc_name->formal; formal; formal = formal->next)
{
+ /* Ignore alternate returns. */
+ if (formal->sym == NULL)
+ continue;
+
/* We don't have a clever way of identifying arguments, so resort to
a brute-force search. */
for (thunk_formal = thunk_sym->formal;
@@ -1415,7 +1440,47 @@ build_entry_thunks (gfc_namespace * ns)
args = chainon (args, nreverse (string_args));
tmp = ns->proc_name->backend_decl;
tmp = gfc_build_function_call (tmp, args);
- /* TODO: function return value. */
+ if (ns->proc_name->attr.mixed_entry_master)
+ {
+ tree union_decl, field;
+ tree master_type = TREE_TYPE (ns->proc_name->backend_decl);
+
+ union_decl = build_decl (VAR_DECL, get_identifier ("__result"),
+ TREE_TYPE (master_type));
+ DECL_ARTIFICIAL (union_decl) = 1;
+ DECL_EXTERNAL (union_decl) = 0;
+ TREE_PUBLIC (union_decl) = 0;
+ TREE_USED (union_decl) = 1;
+ layout_decl (union_decl, 0);
+ pushdecl (union_decl);
+
+ DECL_CONTEXT (union_decl) = current_function_decl;
+ tmp = build2 (MODIFY_EXPR,
+ TREE_TYPE (union_decl),
+ union_decl, tmp);
+ gfc_add_expr_to_block (&body, tmp);
+
+ for (field = TYPE_FIELDS (TREE_TYPE (union_decl));
+ field; field = TREE_CHAIN (field))
+ if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)),
+ thunk_sym->result->name) == 0)
+ break;
+ gcc_assert (field != NULL_TREE);
+ tmp = build3 (COMPONENT_REF, TREE_TYPE (field), union_decl, field,
+ NULL_TREE);
+ tmp = build2 (MODIFY_EXPR,
+ TREE_TYPE (DECL_RESULT (current_function_decl)),
+ DECL_RESULT (current_function_decl), tmp);
+ tmp = build1_v (RETURN_EXPR, tmp);
+ }
+ else if (TREE_TYPE (DECL_RESULT (current_function_decl))
+ != void_type_node)
+ {
+ tmp = build2 (MODIFY_EXPR,
+ TREE_TYPE (DECL_RESULT (current_function_decl)),
+ DECL_RESULT (current_function_decl), tmp);
+ tmp = build1_v (RETURN_EXPR, tmp);
+ }
gfc_add_expr_to_block (&body, tmp);
/* Finish off this function and send it for code generation. */
@@ -1444,14 +1509,25 @@ build_entry_thunks (gfc_namespace * ns)
points and the master function. Clear them so that they are
recreated for each function. */
for (formal = thunk_sym->formal; formal; formal = formal->next)
+ if (formal->sym != NULL) /* Ignore alternate returns. */
+ {
+ formal->sym->backend_decl = NULL_TREE;
+ if (formal->sym->ts.type == BT_CHARACTER)
+ formal->sym->ts.cl->backend_decl = NULL_TREE;
+ }
+
+ if (thunk_sym->attr.function)
{
- formal->sym->backend_decl = NULL_TREE;
- if (formal->sym->ts.type == BT_CHARACTER)
- formal->sym->ts.cl->backend_decl = NULL_TREE;
+ if (thunk_sym->ts.type == BT_CHARACTER)
+ thunk_sym->ts.cl->backend_decl = NULL_TREE;
+ if (thunk_sym->result->ts.type == BT_CHARACTER)
+ thunk_sym->result->ts.cl->backend_decl = NULL_TREE;
}
}
gfc_set_backend_locus (&old_loc);
+
+ current_function_namespace = old_ns;
}
@@ -1482,6 +1558,27 @@ gfc_get_fake_result_decl (gfc_symbol * s
char name[GFC_MAX_SYMBOL_LEN + 10];
+ if (current_function_namespace->proc_name->attr.mixed_entry_master
+ && sym != current_function_namespace->proc_name)
+ {
+ decl = gfc_get_fake_result_decl (current_function_namespace->proc_name);
+ if (decl)
+ {
+ tree field;
+
+ for (field = TYPE_FIELDS (TREE_TYPE (decl));
+ field; field = TREE_CHAIN (field))
+ if (strcmp (IDENTIFIER_POINTER (DECL_NAME (field)),
+ sym->name) == 0)
+ break;
+
+ gcc_assert (field != NULL_TREE);
+ decl = build3 (COMPONENT_REF, TREE_TYPE (field), decl, field,
+ NULL_TREE);
+ }
+ return decl;
+ }
+
if (current_fake_result_decl != NULL_TREE)
return current_fake_result_decl;
@@ -1499,7 +1596,10 @@ gfc_get_fake_result_decl (gfc_symbol * s
if (gfc_return_by_reference (sym))
{
- decl = DECL_ARGUMENTS (sym->backend_decl);
+ decl = DECL_ARGUMENTS (current_function_decl);
+
+ if (current_function_namespace->proc_name->attr.entry_master)
+ decl = TREE_CHAIN (decl);
TREE_USED (decl) = 1;
if (sym->as)
@@ -1916,11 +2016,17 @@ gfc_trans_deferred_vars (gfc_symbol * pr
{
if (!current_fake_result_decl)
{
- warning ("Function does not return a value");
- return fnbody;
+ gfc_entry_list *el = NULL;
+ if (proc_sym->attr.entry_master)
+ {
+ for (el = proc_sym->ns->entries; el; el = el->next)
+ if (el->sym != el->sym->result)
+ break;
+ }
+ if (el == NULL)
+ warning ("Function does not return a value");
}
-
- if (proc_sym->as)
+ else if (proc_sym->as)
{
fnbody = gfc_trans_dummy_array_bias (proc_sym,
current_fake_result_decl,
@@ -2176,6 +2282,7 @@ gfc_generate_function_code (gfc_namespac
stmtblock_t body;
tree result;
gfc_symbol *sym;
+ gfc_namespace *old_ns;
sym = ns->proc_name;
@@ -2197,6 +2304,9 @@ gfc_generate_function_code (gfc_namespac
saved_function_decls = NULL_TREE;
}
+ old_ns = current_function_namespace;
+ current_function_namespace = ns;
+
trans_function_start (sym);
/* Will be created as needed. */
@@ -2206,6 +2316,19 @@ gfc_generate_function_code (gfc_namespac
gfc_generate_contained_functions (ns);
+ if (ns->entries && ns->proc_name->ts.type == BT_CHARACTER)
+ {
+ /* Copy length backend_decls to all entry point result
+ symbols. */
+ gfc_entry_list *el;
+ tree backend_decl;
+
+ gfc_conv_const_charlen (ns->proc_name->ts.cl);
+ backend_decl = ns->proc_name->result->ts.cl->backend_decl;
+ for (el = ns->entries; el; el = el->next)
+ el->sym->result->ts.cl->backend_decl = backend_decl;
+ }
+
/* Translate COMMON blocks. */
gfc_trans_common (ns);
@@ -2305,6 +2428,7 @@ gfc_generate_function_code (gfc_namespac
saved_function_decls = saved_parent_function_decls;
}
current_function_decl = old_context;
+ current_function_namespace = old_ns;
if (decl_function_context (fndecl))
/* Register this function with cgraph just far enough to get it
--- gcc/fortran/trans-array.c.jj 2005-03-25 11:37:26.000000000 +0100
+++ gcc/fortran/trans-array.c 2005-04-25 16:04:45.000000000 +0200
@@ -3373,7 +3373,7 @@ gfc_trans_dummy_array_bias (gfc_symbol *
/* Only do the entry/initialization code if the arg is present. */
dumdesc = GFC_DECL_SAVED_DESCRIPTOR (tmpdesc);
- optional_arg = sym->attr.optional || sym->ns->proc_name->attr.entry_master;
+ optional_arg = sym->attr.optional;
if (optional_arg)
{
tmp = gfc_conv_expr_present (sym);
--- gcc/testsuite/gfortran.dg/entry_3.f90.jj 2005-04-26 10:25:27.000000000 +0200
+++ gcc/testsuite/gfortran.dg/entry_3.f90 2005-04-26 11:31:24.000000000 +0200
@@ -0,0 +1,28 @@
+! { dg-do compile { target i?86-*-* x86_64-*-* } }
+function f1 () result (r) ! { dg-error "can't be a POINTER" }
+integer, pointer :: r
+real e1
+allocate (r)
+r = 6
+return
+entry e1 ()
+e1 = 12
+entry e1a ()
+e1a = 13
+end function
+function f2 ()
+integer, dimension (2, 7, 6) :: e2 ! { dg-error "can't be an array" }
+f2 = 6
+return
+entry e2 ()
+e2 (:, :, :) = 2
+end function
+integer*8 function f3 () ! { dg-error "can't be of type" }
+complex*16 e3 ! { dg-error "can't be of type" }
+f3 = 1
+return
+entry e3 ()
+e3 = 2
+entry e3a ()
+e3a = 3
+end function
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_5.f90.jj 2005-04-25 12:39:04.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_5.f90 2005-04-25 12:39:04.000000000 +0200
@@ -0,0 +1,51 @@
+! Test alternate entry points for functions when the result types
+! of all entry points match
+
+ function f1 (str, i, j) result (r)
+ character str*(*), r1*(*), r2*(*), r*(*)
+ integer i, j
+ r = str (i:j)
+ return
+ entry e1 (str, i, j) result (r1)
+ i = i + 1
+ entry e2 (str, i, j) result (r2)
+ j = j - 1
+ r2 = str (i:j)
+ end function
+
+ function f3 () result (r)
+ character r3*5, r4*5, r*5
+ integer i
+ r = 'ABCDE'
+ return
+ entry e3 (i) result (r3)
+ entry e4 (i) result (r4)
+ if (i .gt. 0) then
+ r3 = 'abcde'
+ else
+ r4 = 'UVWXY'
+ endif
+ end function
+
+ program entrytest
+ character f1*16, e1*16, e2*16, str*16, ret*16
+ character f3*5, e3*5, e4*5
+ integer i, j
+ str = 'ABCDEFGHIJ'
+ i = 2
+ j = 6
+ ret = f1 (str, i, j)
+ if ((i .ne. 2) .or. (j .ne. 6)) call abort ()
+ if (ret .ne. 'BCDEF') call abort ()
+ ret = e1 (str, i, j)
+ if ((i .ne. 3) .or. (j .ne. 5)) call abort ()
+ if (ret .ne. 'CDE') call abort ()
+ ret = e2 (str, i, j)
+ if ((i .ne. 3) .or. (j .ne. 4)) call abort ()
+ if (ret .ne. 'CD') call abort ()
+ if (f3 () .ne. 'ABCDE') call abort ()
+ if (e3 (1) .ne. 'abcde') call abort ()
+ if (e4 (1) .ne. 'abcde') call abort ()
+ if (e3 (0) .ne. 'UVWXY') call abort ()
+ if (e4 (0) .ne. 'UVWXY') call abort ()
+ end program
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_2.f90.jj 2005-04-25 12:39:04.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_2.f90 2005-04-25 12:39:04.000000000 +0200
@@ -0,0 +1,51 @@
+! Test alternate entry points for functions when the result types
+! of all entry points match
+
+ character*(*) function f1 (str, i, j)
+ character str*(*), e1*(*), e2*(*)
+ integer i, j
+ f1 = str (i:j)
+ return
+ entry e1 (str, i, j)
+ i = i + 1
+ entry e2 (str, i, j)
+ j = j - 1
+ e2 = str (i:j)
+ end function
+
+ character*5 function f3 ()
+ character e3*(*), e4*(*)
+ integer i
+ f3 = 'ABCDE'
+ return
+ entry e3 (i)
+ entry e4 (i)
+ if (i .gt. 0) then
+ e3 = 'abcde'
+ else
+ e4 = 'UVWXY'
+ endif
+ end function
+
+ program entrytest
+ character f1*16, e1*16, e2*16, str*16, ret*16
+ character f3*5, e3*5, e4*5
+ integer i, j
+ str = 'ABCDEFGHIJ'
+ i = 2
+ j = 6
+ ret = f1 (str, i, j)
+ if ((i .ne. 2) .or. (j .ne. 6)) call abort ()
+ if (ret .ne. 'BCDEF') call abort ()
+ ret = e1 (str, i, j)
+ if ((i .ne. 3) .or. (j .ne. 5)) call abort ()
+ if (ret .ne. 'CDE') call abort ()
+ ret = e2 (str, i, j)
+ if ((i .ne. 3) .or. (j .ne. 4)) call abort ()
+ if (ret .ne. 'CD') call abort ()
+ if (f3 () .ne. 'ABCDE') call abort ()
+ if (e3 (1) .ne. 'abcde') call abort ()
+ if (e4 (1) .ne. 'abcde') call abort ()
+ if (e3 (0) .ne. 'UVWXY') call abort ()
+ if (e4 (0) .ne. 'UVWXY') call abort ()
+ end program
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_3.f90.jj 2005-04-25 12:39:04.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_3.f90 2005-04-25 12:39:04.000000000 +0200
@@ -0,0 +1,40 @@
+ subroutine f1 (n, *, i)
+ integer n, i
+ if (i .ne. 42) call abort ()
+ entry e1 (n, *)
+ if (n .eq. 1) return 1
+ if (n .eq. 2) return
+ return
+ entry e2 (n, i, *, *, *)
+ if (i .ne. 46) call abort ()
+ if (n .ge. 4) return
+ return n
+ entry e3 (n, i)
+ if ((i .ne. 48) .or. (n .ne. 61)) call abort ()
+ end subroutine
+
+ program alt_return
+ implicit none
+
+ call f1 (1, *10, 42)
+20 continue
+ call abort ()
+10 continue
+ call f1 (2, *20, 42)
+ call f1 (3, *20, 42)
+ call e1 (2, *20)
+ call e1 (1, *30)
+ call abort ()
+30 continue
+ call e2 (1, 46, *40, *20, *20)
+ call abort ()
+40 continue
+ call e2 (2, 46, *20, *50, *20)
+ call abort ()
+50 continue
+ call e2 (3, 46, *20, *20, *60)
+ call abort ()
+60 continue
+ call e2 (4, 46, *20, *20, *20)
+ call e3 (61, 48)
+ end program
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_7.f90.jj 2005-04-25 17:53:22.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_7.f90 2005-04-25 18:13:57.000000000 +0200
@@ -0,0 +1,106 @@
+! Test alternate entry points for functions when the result types
+! of all entry points match
+
+ function f1 (a)
+ integer a, b
+ integer, pointer :: f1, e1
+ allocate (f1)
+ f1 = 15 + a
+ return
+ entry e1 (b)
+ allocate (e1)
+ e1 = 42 + b
+ end function
+ function f2 ()
+ real, pointer :: f2, e2
+ entry e2 ()
+ allocate (e2)
+ e2 = 45
+ end function
+ function f3 ()
+ double precision, pointer :: f3, e3
+ entry e3 ()
+ allocate (f3)
+ f3 = 47
+ end function
+ function f4 (a) result (r)
+ double precision a, b
+ double precision, pointer :: r, s
+ allocate (r)
+ r = 15 + a
+ return
+ entry e4 (b) result (s)
+ allocate (s)
+ s = 42 + b
+ end function
+ function f5 () result (r)
+ integer, pointer :: r, s
+ entry e5 () result (s)
+ allocate (r)
+ r = 45
+ end function
+ function f6 () result (r)
+ real, pointer :: r, s
+ entry e6 () result (s)
+ allocate (s)
+ s = 47
+ end function
+
+ program entrytest
+ interface
+ function f1 (a)
+ integer a
+ integer, pointer :: f1
+ end function
+ function e1 (b)
+ integer b
+ integer, pointer :: e1
+ end function
+ function f2 ()
+ real, pointer :: f2
+ end function
+ function e2 ()
+ real, pointer :: e2
+ end function
+ function f3 ()
+ double precision, pointer :: f3
+ end function
+ function e3 ()
+ double precision, pointer :: e3
+ end function
+ function f4 (a)
+ double precision a
+ double precision, pointer :: f4
+ end function
+ function e4 (b)
+ double precision b
+ double precision, pointer :: e4
+ end function
+ function f5 ()
+ integer, pointer :: f5
+ end function
+ function e5 ()
+ integer, pointer :: e5
+ end function
+ function f6 ()
+ real, pointer :: f6
+ end function
+ function e6 ()
+ real, pointer :: e6
+ end function
+ end interface
+ double precision d
+ if (f1 (6) .ne. 21) call abort ()
+ if (e1 (7) .ne. 49) call abort ()
+ if (f2 () .ne. 45) call abort ()
+ if (e2 () .ne. 45) call abort ()
+ if (f3 () .ne. 47) call abort ()
+ if (e3 () .ne. 47) call abort ()
+ d = 17
+ if (f4 (d) .ne. 32) call abort ()
+ if (e4 (d) .ne. 59) call abort ()
+ if (f5 () .ne. 45) call abort ()
+ if (e5 () .ne. 45) call abort ()
+ if (f6 () .ne. 47) call abort ()
+ if (e6 () .ne. 47) call abort ()
+ end
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_6.f90.jj 2005-04-25 17:45:59.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_6.f90 2005-04-25 17:45:21.000000000 +0200
@@ -0,0 +1,109 @@
+! Test alternate entry points for functions when the result types
+! of all entry points match
+
+ function f1 (a)
+ integer, dimension (2, 2) :: a, b, f1, e1
+ f1 (:, :) = 15 + a (1, 1)
+ return
+ entry e1 (b)
+ e1 (:, :) = 42 + b (1, 1)
+ end function
+ function f2 ()
+ real, dimension (2, 2) :: f2, e2
+ entry e2 ()
+ e2 (:, :) = 45
+ end function
+ function f3 ()
+ double precision, dimension (2, 2) :: a, b, f3, e3
+ entry e3 ()
+ f3 (:, :) = 47
+ end function
+ function f4 (a) result (r)
+ double precision, dimension (2, 2) :: a, b, r, s
+ r (:, :) = 15 + a (1, 1)
+ return
+ entry e4 (b) result (s)
+ s (:, :) = 42 + b (1, 1)
+ end function
+ function f5 () result (r)
+ integer, dimension (2, 2) :: r, s
+ entry e5 () result (s)
+ r (:, :) = 45
+ end function
+ function f6 () result (r)
+ real, dimension (2, 2) :: r, s
+ entry e6 () result (s)
+ s (:, :) = 47
+ end function
+
+ program entrytest
+ interface
+ function f1 (a)
+ integer, dimension (2, 2) :: a, f1
+ end function
+ function e1 (b)
+ integer, dimension (2, 2) :: b, e1
+ end function
+ function f2 ()
+ real, dimension (2, 2) :: f2
+ end function
+ function e2 ()
+ real, dimension (2, 2) :: e2
+ end function
+ function f3 ()
+ double precision, dimension (2, 2) :: f3
+ end function
+ function e3 ()
+ double precision, dimension (2, 2) :: e3
+ end function
+ function f4 (a)
+ double precision, dimension (2, 2) :: a, f4
+ end function
+ function e4 (b)
+ double precision, dimension (2, 2) :: b, e4
+ end function
+ function f5 ()
+ integer, dimension (2, 2) :: f5
+ end function
+ function e5 ()
+ integer, dimension (2, 2) :: e5
+ end function
+ function f6 ()
+ real, dimension (2, 2) :: f6
+ end function
+ function e6 ()
+ real, dimension (2, 2) :: e6
+ end function
+ end interface
+ integer, dimension (2, 2) :: i, j
+ real, dimension (2, 2) :: r
+ double precision, dimension (2, 2) :: d, e
+ i (:, :) = 6
+ j = f1 (i)
+ if (any (j .ne. 21)) call abort ()
+ i (:, :) = 7
+ j = e1 (i)
+ j (:, :) = 49
+ if (any (j .ne. 49)) call abort ()
+ r = f2 ()
+ if (any (r .ne. 45)) call abort ()
+ r = e2 ()
+ if (any (r .ne. 45)) call abort ()
+ e = f3 ()
+ if (any (e .ne. 47)) call abort ()
+ e = e3 ()
+ if (any (e .ne. 47)) call abort ()
+ d (:, :) = 17
+ e = f4 (d)
+ if (any (e .ne. 32)) call abort ()
+ e = e4 (d)
+ if (any (e .ne. 59)) call abort ()
+ j = f5 ()
+ if (any (j .ne. 45)) call abort ()
+ j = e5 ()
+ if (any (j .ne. 45)) call abort ()
+ r = f6 ()
+ if (any (r .ne. 47)) call abort ()
+ r = e6 ()
+ if (any (r .ne. 47)) call abort ()
+ end
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_4.f90.jj 2005-04-25 12:39:04.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_4.f90 2005-04-25 12:39:04.000000000 +0200
@@ -0,0 +1,64 @@
+! Test alternate entry points for functions when the result types
+! of all entry points don't match
+
+ integer function f1 (a)
+ integer a, b
+ double precision e1
+ f1 = 15 + a
+ return
+ entry e1 (b)
+ e1 = 42 + b
+ end function
+ complex function f2 (a)
+ integer a
+ logical e2
+ entry e2 (a)
+ if (a .gt. 0) then
+ e2 = a .lt. 46
+ else
+ f2 = 45
+ endif
+ end function
+ function f3 (a) result (r)
+ integer a, b
+ real r
+ logical s
+ complex c
+ r = 15 + a
+ return
+ entry e3 (b) result (s)
+ s = b .eq. 42
+ return
+ entry g3 (b) result (c)
+ c = b + 11
+ end function
+ function f4 (a) result (r)
+ logical r
+ integer a, s
+ double precision t
+ entry e4 (a) result (s)
+ entry g4 (a) result (t)
+ r = a .lt. 0
+ if (a .eq. 0) s = 16 + a
+ if (a .gt. 0) t = 17 + a
+ end function
+
+ program entrytest
+ integer f1, e4
+ real f3
+ double precision e1, g4
+ logical e2, e3, f4
+ complex f2, g3
+ if (f1 (6) .ne. 21) call abort ()
+ if (e1 (7) .ne. 49) call abort ()
+ if (f2 (0) .ne. 45) call abort ()
+ if (.not. e2 (45)) call abort ()
+ if (e2 (46)) call abort ()
+ if (f3 (17) .ne. 32) call abort ()
+ if (.not. e3 (42)) call abort ()
+ if (e3 (41)) call abort ()
+ if (g3 (12) .ne. 23) call abort ()
+ if (.not. f4 (-5)) call abort ()
+ if (e4 (0) .ne. 16) call abort ()
+ if (g4 (2) .ne. 19) call abort ()
+ end
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_1.f90.jj 2005-04-25 12:39:04.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_1.f90 2005-04-26 11:20:16.000000000 +0200
@@ -0,0 +1,74 @@
+! Test alternate entry points for functions when the result types
+! of all entry points match
+
+ function f1 (a)
+ integer a, b, f1, e1
+ f1 = 15 + a
+ return
+ entry e1 (b)
+ e1 = 42 + b
+ end function
+ function f2 ()
+ real f2, e2
+ entry e2 ()
+ e2 = 45
+ end function
+ function f3 ()
+ double precision a, b, f3, e3
+ entry e3 ()
+ f3 = 47
+ end function
+ function f4 (a) result (r)
+ double precision a, b, r, s
+ r = 15 + a
+ return
+ entry e4 (b) result (s)
+ s = 42 + b
+ end function
+ function f5 () result (r)
+ integer r, s
+ entry e5 () result (s)
+ r = 45
+ end function
+ function f6 () result (r)
+ real r, s
+ entry e6 () result (s)
+ s = 47
+ end function
+ function f7 ()
+ entry e7 ()
+ e7 = 163
+ end function
+ function f8 () result (r)
+ entry e8 ()
+ e8 = 115
+ end function
+ function f9 ()
+ entry e9 () result (r)
+ r = 119
+ end function
+
+ program entrytest
+ integer f1, e1, f5, e5
+ real f2, e2, f6, e6, f7, e7, f8, e8, f9, e9
+ double precision f3, e3, f4, e4, d
+ if (f1 (6) .ne. 21) call abort ()
+ if (e1 (7) .ne. 49) call abort ()
+ if (f2 () .ne. 45) call abort ()
+ if (e2 () .ne. 45) call abort ()
+ if (f3 () .ne. 47) call abort ()
+ if (e3 () .ne. 47) call abort ()
+ d = 17
+ if (f4 (d) .ne. 32) call abort ()
+ if (e4 (d) .ne. 59) call abort ()
+ if (f5 () .ne. 45) call abort ()
+ if (e5 () .ne. 45) call abort ()
+ if (f6 () .ne. 47) call abort ()
+ if (e6 () .ne. 47) call abort ()
+ if (f7 () .ne. 163) call abort ()
+ if (e7 () .ne. 163) call abort ()
+ if (f8 () .ne. 115) call abort ()
+ if (e8 () .ne. 115) call abort ()
+ if (f9 () .ne. 119) call abort ()
+ if (e9 () .ne. 119) call abort ()
+ end
--- gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90.jj 2005-04-25 18:18:23.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/entry_8.f90 2005-04-25 18:17:58.000000000 +0200
@@ -0,0 +1,24 @@
+module m
+type t
+ integer i
+ real x (5)
+end type t
+end module m
+
+function f (i)
+ use m
+ type (t) :: f,g
+ f % i = i
+ return
+ entry g (x)
+ g%x = x
+end function f
+
+use m
+type (t) :: f, g, res
+
+res = f (42)
+if (res%i /= 42) call abort ()
+res = g (1.)
+if (any (res%x /= 1.)) call abort ()
+end
gcc4-gfortran-namelist.patch:
gcc/fortran/gfortran.texi | 53 +
gcc/fortran/trans-io.c | 358 ++++++----
gcc/testsuite/gfortran.dg/namelist_1.f90 | 3
gcc/testsuite/gfortran.dg/namelist_11.f | 55 +
gcc/testsuite/gfortran.dg/namelist_12.f | 56 +
gcc/testsuite/gfortran.dg/namelist_13.f90 | 38 +
gcc/testsuite/gfortran.dg/namelist_14.f90 | 94 ++
gcc/testsuite/gfortran.dg/namelist_15.f90 | 58 +
gcc/testsuite/gfortran.dg/namelist_16.f90 | 29
gcc/testsuite/gfortran.dg/namelist_17.f90 | 30
gcc/testsuite/gfortran.dg/namelist_18.f90 | 37 +
gcc/testsuite/gfortran.dg/namelist_19.f90 | 135 +++
gcc/testsuite/gfortran.dg/namelist_2.f90 | 7
gcc/testsuite/gfortran.dg/namelist_20.f90 | 35 +
gcc/testsuite/gfortran.dg/namelist_3.f90 | 7
gcc/testsuite/gfortran.dg/pr12884.f | 25
gcc/testsuite/gfortran.dg/pr17285.f90 | 25
gcc/testsuite/gfortran.dg/pr17472.f | 12
gcc/testsuite/gfortran.dg/pr18122.f90 | 45 +
gcc/testsuite/gfortran.dg/pr18210.f90 | 21
gcc/testsuite/gfortran.dg/pr18392.f90 | 22
gcc/testsuite/gfortran.dg/pr19467.f90 | 18
gcc/testsuite/gfortran.dg/pr19657.f | 21
libgfortran/io/io.h | 77 +-
libgfortran/io/list_read.c | 1044 ++++++++++++++++++++++++++----
libgfortran/io/lock.c | 24
libgfortran/io/transfer.c | 119 +--
libgfortran/io/write.c | 368 +++++++++-
28 files changed, 2412 insertions(+), 404 deletions(-)
--- NEW FILE gcc4-gfortran-namelist.patch ---
2005-04-17 Paul Thomas <pault at gcc.gnu.org>
PR fortran/17472
PR fortran/18209
PR fortran/18396
PR fortran/19467
PR fortran/19657
* fortran/trans-io.c (gfc_build_io_library_fndecls): Create
declaration for st_set_nml_var and st_set_nml_var_dim. Remove
declarations of old namelist functions.
(build_dt): Simplified call to transfer_namelist_element.
(nml_get_addr_expr): Generates address expression for start of
object data. New function.
(nml_full_name): Qualified name for derived type components. New
function.
(transfer_namelist_element): Modified for calls to new functions
and improved derived type handling.
PR libfortran/12884 gfortran.dg/pr12884.f: New test
PR libfortran/17285 gfortran.dg/pr17285.f90: New test
PR libfortran/17472, 18396, 18209 gfortran.dg/pr17472.f: New test
PR libfortran/18122, 18591 gfortran.dg/pr18122.f90: New test
PR libfortran/18210 gfortran.dg/pr18210.f90: New test
PR libfortran/18392 gfortran.dg/pr18392.f90: New test
PR libfortran/19467 gfortran.dg/pr19467.f90: New test
PR libfortran/19657 gfortran.dg/pr19657.f90: New test
* gfortran.dg/namelist_1.f90: Correct comment (PUBLIC and PRIVATE wrong way round).
* gfortran.dg/namelist_2.f90: Variables with INTENT(IN) cannot be in namelists. New test
* gfortran.dg/namelist_3.f90: Pointers cannot be in namelists. New test
* gfortran.dg/namelist_11.f: Tests reals and qualifiers in namelist. New test
* gfortran.dg/namelist_12.f: Tests integers and qualifiers in namelist. New test
* gfortran.dg/namelist_13.f90: Tests derived types in namelist. New test
* gfortran.dg/namelist_14.f90: Tests trans-io.c namelist support. New test
* gfortran.dg/namelist_15.f90: Tests arrays of derived types in namelist. New test
* gfortran.dg/namelist_16.f90: Tests complex in namelist. New test
* gfortran.dg/namelist_17.f90: Tests logical in namelist. New test
* gfortran.dg/namelist_18.f90: Tests charcter delimiters in namelist. New test
* gfortran.dg/namelist_19.f90: Tests namelist errors. New test
* gfortran.dg/namelist_20.f90: Tests negative bounds for explicit arrays. New test
2005-04-18 Paul Thomas <pault at gcc.gnu.org>
Jerry DeLisle <jvdelisle at verizon.net>
* io/write.c (nml_write_obj): Provide 1 more byte for ext_name.
* io/list_read.c (nml_get_obj_data): Put extra brackets in get_mem
call for ext_name. These fix the bug reported by Jerry DeLisle to
the fortran list and are based on his suggested fix.
2005-04-18 Paul Thomas <pault at gcc.gnu.org>
* io/list_read.c (nml_touch_nodes, nml_read_obj,
nml_get_obj_data): Fix memory leaks in code for derived types.
2005-04-17 Paul Thomas <pault at gcc.gnu.org>
* io/list_read.c (eat_separator): at_eol = 1 replaced
(zapped at some time?).
2005-04-17 Paul Thomas <pault at gcc.gnu.org>
PR libgfortran/12884
PR libgfortran/17285
PR libgfortran/18122
PR libgfortran/18210
PR libgfortran/18392
PR libgfortran/18591
PR libgfortran/18879
* io/io.h (nml_ls): Declare.
(namelist_info): Modify for arrays.
* io/list_read.c (namelist_read): Reduced to call to new functions.
(match_namelist_name): Simplified.
(nml_query): Handles stdin queries ? and =?. New function.
(nml_get_obj_data): Parses object name. New function.
(touch_nml_nodes): Marks objects for read. New function.
(untouch_nml_nodes): Resets objects. New function.
(parse_qualifier): Parses and checks qualifiers. New function
(nml_read_object): Reads and stores object data. New function.
(eat_separator): No new_record on '/' in namelist.
(finish_separator): No new_record on '/' in namelist.
(read_logical): Error return for namelist.
(read_integer): Error return for namelist.
(read_complex): Error return for namelist.
(read_real): Error return for namelist.
* io/lock.c (library_end): Free extended namelist_info types.
* io/transfer.c (st_set_nml_var): Modified for arrays.
(st_set_nml_var_dim): Dimension descriptors. New function.
* io/write.c (namelist_write): Reduced to call to new functions.
(nml_write_obj): Writes output for object. New function.
(write_integer): Suppress leading blanks for repeat counts.
(write_int): Suppress leading blanks for repeat counts.
(write_float): Suppress leading blanks for repeat counts.
(output_float): Suppress leading blanks for repeat counts.
--- gcc/fortran/trans-io.c 15 Mar 2005 02:52:37 -0000 1.34
+++ gcc/fortran/trans-io.c 17 Apr 2005 20:09:33 -0000 1.35
@@ -125,11 +125,8 @@ static GTY(()) tree iocall_iolength_done
static GTY(()) tree iocall_rewind;
static GTY(()) tree iocall_backspace;
static GTY(()) tree iocall_endfile;
-static GTY(()) tree iocall_set_nml_val_int;
-static GTY(()) tree iocall_set_nml_val_float;
-static GTY(()) tree iocall_set_nml_val_char;
-static GTY(()) tree iocall_set_nml_val_complex;
-static GTY(()) tree iocall_set_nml_val_log;
+static GTY(()) tree iocall_set_nml_val;
+static GTY(()) tree iocall_set_nml_val_dim;
/* Variable for keeping track of what the last data transfer statement
was. Used for deciding which subroutine to call when the data
@@ -314,34 +311,19 @@ gfc_build_io_library_fndecls (void)
gfc_build_library_function_decl (get_identifier (PREFIX("st_iolength_done")),
gfc_int4_type_node, 0);
- iocall_set_nml_val_int =
- gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_int")),
- void_type_node, 4,
- pvoid_type_node, pvoid_type_node,
- gfc_int4_type_node,gfc_int4_type_node);
- iocall_set_nml_val_float =
- gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_float")),
- void_type_node, 4,
- pvoid_type_node, pvoid_type_node,
- gfc_int4_type_node,gfc_int4_type_node);
- iocall_set_nml_val_char =
- gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_char")),
+ iocall_set_nml_val =
+ gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var")),
void_type_node, 5,
pvoid_type_node, pvoid_type_node,
- gfc_int4_type_node, gfc_int4_type_node,
- gfc_charlen_type_node);
- iocall_set_nml_val_complex =
- gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_complex")),
- void_type_node, 4,
- pvoid_type_node, pvoid_type_node,
- gfc_int4_type_node,gfc_int4_type_node);
- iocall_set_nml_val_log =
- gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_log")),
- void_type_node, 4,
- pvoid_type_node, pvoid_type_node,
- gfc_int4_type_node,gfc_int4_type_node);
+ gfc_int4_type_node, gfc_charlen_type_node,
+ gfc_int4_type_node);
+ iocall_set_nml_val_dim =
+ gfc_build_library_function_decl (get_identifier (PREFIX("st_set_nml_var_dim")),
+ void_type_node, 4,
+ gfc_int4_type_node, gfc_int4_type_node,
+ gfc_int4_type_node, gfc_int4_type_node);
}
@@ -815,11 +797,11 @@ gfc_trans_inquire (gfc_code * code)
return gfc_finish_block (&block);
}
-
static gfc_expr *
gfc_new_nml_name_expr (const char * name)
{
gfc_expr * nml_name;
+
nml_name = gfc_get_expr();
nml_name->ref = NULL;
nml_name->expr_type = EXPR_CONSTANT;
@@ -832,114 +814,229 @@ gfc_new_nml_name_expr (const char * name
return nml_name;
}
-static gfc_expr *
-get_new_var_expr(gfc_symbol * sym)
+/* nml_full_name builds up the fully qualified name of a
+ derived type component. */
+
+static char*
+nml_full_name (const char* var_name, const char* cmp_name)
+{
+ int full_name_length;
+ char * full_name;
+
+ full_name_length = strlen (var_name) + strlen (cmp_name) + 1;
+ full_name = (char*)gfc_getmem (full_name_length + 1);
+ strcpy (full_name, var_name);
+ full_name = strcat (full_name, "%");
+ full_name = strcat (full_name, cmp_name);
+ return full_name;
+}
+
+/* nml_get_addr_expr builds an address expression from the
+ gfc_symbol or gfc_component backend_decl's. An offset is
+ provided so that the address of an element of an array of
+ derived types is returned. This is used in the runtime to
+ determine that span of the derived type. */
+
+static tree
+nml_get_addr_expr (gfc_symbol * sym, gfc_component * c,
+ tree base_addr)
{
[...2980 lines suppressed...]
+
+ namelist /schnecke/ z, dg, a, t, delta, s, nk, rb, alpha0
+
+ open (10,status="scratch")
+ write (10, *) "&SCHNECKE"
+ write (10, *) " z=1,"
+ write (10, *) " dg=58.4,"
+ write (10, *) " a=48.,"
+ write (10, *) " delta=0.4,"
+ write (10, *) " s=0.4,"
+ write (10, *) " nk=6,"
+ write (10, *) " rb=60, 0, 40,"
+ write (10, *) " alpha0=20.,"
+ write (10, *) "/"
+
+ rewind (10)
+ read (10,schnecke)
+ close (10)
+ if ((z /= 1) .or. (dg /= 58.4_dr) .or. (a /= 48.0_dr) .or. &
+ (delta /= 0.4_dr).or. (s /= 0.4_dr) .or. (nk /= 6) .or. &
+ (rb(1) /= 60._dr).or. (rb(2) /= 0.0_dr).or. (rb(3) /=40.0_dr).or. &
+ (alpha0 /= 20.0_dr)) call abort ()
+end program sechs_w
--- gcc/testsuite/gfortran.dg/pr18210.f90 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gfortran.dg/pr18210.f90 17 Apr 2005 20:09:37 -0000 1.1
@@ -0,0 +1,21 @@
+! { dg-do run }
+! Names in upper case and object names starting column 2
+! Based on example provided by thomas.koenig at online.de
+
+program pr18210
+
+ real :: a
+ character*80 :: buffer
+ namelist /foo/ a
+
+ a = 1.4
+ open (10, status = "scratch")
+ write (10,foo)
+ rewind (10)
+ read (10, '(a)') buffer
+ if (buffer(2:4) /= "FOO") call abort ()
+ read (10, '(a)') buffer
+ if (buffer(1:2) /= " A") call abort ()
+ close (10)
+
+end program pr18210
--- gcc/testsuite/gfortran.dg/pr18392.f90 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gfortran.dg/pr18392.f90 17 Apr 2005 20:09:37 -0000 1.1
@@ -0,0 +1,22 @@
+! { dg-do run }
+! pr 18392
+! test namelist with derived types
+! Based on example provided by thomas.koenig at online.de
+
+program pr18392
+ implicit none
+ type foo
+ integer a
+ real b
+ end type foo
+ type(foo) :: a
+ namelist /nl/ a
+ open (10, status="scratch")
+ write (10,*) " &NL"
+ write (10,*) " A%A = 10,"
+ write (10,*) "/"
+ rewind (10)
+ read (10,nl)
+ close (10)
+ IF (a%a /= 10.0) call abort ()
+end program pr18392
--- gcc/testsuite/gfortran.dg/pr19467.f90 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gfortran.dg/pr19467.f90 17 Apr 2005 20:09:37 -0000 1.1
@@ -0,0 +1,18 @@
+! { dg-do run }
+! pr 19467
+! test namelist with character arrays
+! Based on example provided by paulthomas2 at wanadoo.fr
+
+program pr19467
+ implicit none
+ integer :: ier
+ character(len=2) :: ch(2)
+ character(len=2) :: dh(2)=(/"aa","bb"/)
+ namelist /a/ ch
+ open (10, status = "scratch")
+ write (10, *) "&A ch = 'aa' , 'bb' /"
+ rewind (10)
+ READ (10,nml=a, iostat = ier)
+ close (10)
+ if ((ier /= 0) .or. (any (ch /= dh))) call abort ()
+end program pr19467
--- gcc/testsuite/gfortran.dg/pr19657.f 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gfortran.dg/pr19657.f 17 Apr 2005 20:09:37 -0000 1.1
@@ -0,0 +1,21 @@
+c { dg-do run }
+c pr 19657
+c test namelist not skipped if ending with logical.
+c Based on example provided by fuyuki at ccsr.u-tokyo.ac.jp
+
+ program pr19657
+ implicit none
+ logical l
+ integer i, ctr
+ namelist /nm/ i, l
+ open (10, status = "scratch")
+ write (10,*) "&nm i=1,l=t &end"
+ write (10,*) "&nm i=2 &end"
+ write (10,*) "&nm i=3 &end"
+ rewind (10)
+ do ctr = 1,3
+ read (10,nm,end=190)
+ if (i.ne.ctr) call abort ()
+ enddo
+ 190 continue
+ end
--- gcc/fortran/gfortran.texi 24 Mar 2005 18:16:33 -0000 1.11
+++ gcc/fortran/gfortran.texi 23 Apr 2005 17:03:07 -0000 1.12
@@ -459,7 +459,6 @@ Usable with bugs:
@itemize @minus
@item Formatted sequential ('T' edit descriptor, and others)
- at item Namelist (can read a namelist that it writes, but not free-form)
@end itemize
Not recommended:
@@ -574,9 +573,6 @@ Set precision for fp units that support
Variables for setting fp rounding mode.
@item
-Support old style namelists ending in $end or &end.
-
- at item
Variable to fill uninitialized variables with a user-defined bit
pattern.
@@ -627,6 +623,7 @@ meaning.
@menu
* Old-style kind specifications::
* Old-style variable initialization::
+* Extensions to namelist::
@end menu
@node Old-style kind specifications
@@ -675,6 +672,54 @@ Examples of standard conforming code equ
DATA i,j,x /1,2,3*0.,1./
@end smallexample
+ at node Extensions to namelist
+ at section Extensions to namelist
+ at cindex Namelist
+
+ at command{gfortran} fully supports the fortran95 standard for namelist io
+including array qualifiers, substrings and fully qualified derived types.
+The output from a namelist write is compatible with namelist read. The
+output has all names in upper case and indentation to column 1 after the
+namelist name. Two extensions are permitted:
+
+Old-style use of $ instead of &
+ at smallexample
+$MYNML
+ X(:)%Y(2) = 1.0 2.0 3.0
+ CH(1:4) = "abcd"
+$END
+ at end smallexample
+
+It should be noticed that the default terminator is / rather than &END.
+
+Querying of the namelist when inputting from stdin. After at least
+one space, entering ? sends to stdout the namelist name and the names of
+the variables in the namelist:
+ at smallexample
+?
+
+&mynml
+ x
+ x%y
+ ch
+&end
+ at end smallexample
+
+Entering =? outputs the namelist to stdout, as if WRITE (*,NML = mynml)
+had been called:
+ at smallexample
+=?
+
+&MYNML
+ X(1)%Y= 0.000000 , 1.000000 , 0.000000 ,
+ X(2)%Y= 0.000000 , 2.000000 , 0.000000 ,
+ X(3)%Y= 0.000000 , 3.000000 , 0.000000 ,
+ CH=abcd, /
+ at end smallexample
+
+To aid this dialog, when input is from stdin, errors produce send their
+messages to stderr and execution continues, even if IOSTAT is set.
+
@include intrinsic.texi
@c ---------------------------------------------------------------------
@c Contributing
gcc4-java-awt-thread-init.patch:
gnu_java_awt_peer_gtk_GtkToolkit.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
--- NEW FILE gcc4-java-awt-thread-init.patch ---
--- libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c.jj 2005-04-08 11:59:39.223115951 -0400
+++ libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c 2005-04-08 12:00:19.634845783 -0400
@@ -275,10 +275,13 @@
}
(*env)->GetJavaVM( env, &the_vm );
- if (portableNativeSync)
- g_thread_init ( &portable_native_sync_jni_functions );
- else
- g_thread_init ( NULL );
+ if (!g_thread_supported ())
+ {
+ if (portableNativeSync)
+ g_thread_init ( &portable_native_sync_jni_functions );
+ else
+ g_thread_init ( NULL );
+ }
/* Debugging progress message; uncomment if needed: */
/* printf("called gthread init\n"); */
gcc4-java-x509-extension.patch:
der/DERValue.java | 7 +++++++
x509/ext/PrivateKeyUsagePeriod.java | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
--- NEW FILE gcc4-java-x509-extension.patch ---
2005-04-22 Casey Marshall <csm at gnu.org>
* gnu/java/security/der/DERValue.java
(getValueAs): new method.
* gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
(<init>): read both dates with 'DERValue.getValueAs', with
'GENERALIZED_TIME' as the argument.
--- libjava/gnu/java/security/der/DERValue.java 14 Aug 2004 17:51:42 -0000 1.2
+++ libjava/gnu/java/security/der/DERValue.java 18 Apr 2005 02:43:50 -0000
@@ -119,6 +119,13 @@
return value;
}
+ public Object getValueAs (final int derType) throws IOException
+ {
+ byte[] encoded = getEncoded ();
+ encoded[0] = (byte) derType;
+ return DERReader.read (encoded).getValue ();
+ }
+
public byte[] getEncoded()
{
if (encoded == null)
--- libjava/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java 7 Nov 2004 19:40:56 -0000 1.1
+++ libjava/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java 18 Apr 2005 02:43:50 -0000
@@ -71,14 +71,14 @@
val = der.read();
if (val.getTagClass() == DER.APPLICATION || val.getTag() == 0)
{
- notBefore = (Date) val.getValue();
+ notBefore = (Date) val.getValueAs (DER.GENERALIZED_TIME);
val = der.read();
}
else
notBefore = null;
if (val.getTagClass() == DER.APPLICATION || val.getTag() == 1)
{
- notAfter = (Date) val.getValue();
+ notAfter = (Date) val.getValueAs (DER.GENERALIZED_TIME);
}
else
notAfter = null;
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- .cvsignore 23 Apr 2005 18:04:19 -0000 1.85
+++ .cvsignore 28 Apr 2005 17:32:52 -0000 1.86
@@ -1 +1 @@
-gcc-4.0.0-20050423.tar.bz2
+gcc-4.0.0-20050428.tar.bz2
gcc4-pr20490.patch:
pr20490.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+)
Index: gcc4-pr20490.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-pr20490.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gcc4-pr20490.patch 20 Apr 2005 07:37:42 -0000 1.2
+++ gcc4-pr20490.patch 28 Apr 2005 17:32:52 -0000 1.3
@@ -4,7 +4,7 @@
--- gcc/testsuite/gcc.dg/tree-ssa/pr20490.c 2005-04-07 15:51:53.775361896 +0200
+++ gcc/testsuite/gcc.dg/tree-ssa/pr20490.c 2005-03-16 17:22:45.000000000 +0100
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-pre" } */
+static int a;
@@ -23,5 +23,3 @@
+ return (y * x);
+
+}
-+
-+
gcc4-pr20768.patch:
except.c | 333 +++++++++++++++++++++++++++++++++-------------------------
expr.c | 16 ++
java-except.h | 4
verify-glue.c | 2
verify.c | 14 --
5 files changed, 207 insertions(+), 162 deletions(-)
Index: gcc4-pr20768.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-pr20768.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gcc4-pr20768.patch 21 Apr 2005 04:14:15 -0000 1.2
+++ gcc4-pr20768.patch 28 Apr 2005 17:32:52 -0000 1.3
@@ -1,14 +1,17 @@
-2005-04-19 Kazu Hirata <kazu at cs.umass.edu>
+2005-04-28 Andrew Haley <aph at redhat.com>
- * except.c: Fix a comment typo.
-
-2005-04-18 Andrew Haley <aph at redhat.com>
+ PR java/21115
+ * expr.c (force_evaluation_order): Convert outgoing args smaller
+ than integer.
+ PR java/20768
* java-except.h (struct eh_range.handler): Remove unused field.
(handle_nested_ranges): Remove function declaration.
- (sanity_check_exception_range): Add function declaration.
+ (sanity_check_exception_range): Add function declaration.
* verify.c (verify_jvm_instructions): Remove call to
handle_nested_ranges.
+ (start_pc_cmp): Remove function.
+ (verify_jvm_instructions): Remove PC sorting of exception regions.
* verify-glue.c (verify_jvm_instructions_new): Call
sanity_check_exception_range.
* except.c (link_handler, eh_range_freelist, link_handler,
@@ -16,9 +19,41 @@
(add_handler): Rewrite.
(sanity_check_exception_range): New function.
(print_ranges): New function.
-
+
+--- gcc/java/expr.c 17 Mar 2005 15:33:30 -0000 1.218.4.2
++++ gcc/java/expr.c 28 Apr 2005 16:35:21 -0000 1.218.4.3
+@@ -3484,7 +3484,8 @@ maybe_adjust_start_pc (struct JCF *jcf,
+ For method invocation, we modify the arguments so that a
+ left-to-right order evaluation is performed. Saved expressions
+ will, in CALL_EXPR order, be reused when the call will be expanded.
+-*/
++
++ We also promote outgoing args if needed. */
+
+ tree
+ force_evaluation_order (tree node)
+@@ -3518,7 +3519,18 @@ force_evaluation_order (tree node)
+ /* This reverses the evaluation order. This is a desired effect. */
+ for (cmp = NULL_TREE; arg; arg = TREE_CHAIN (arg))
+ {
+- tree saved = save_expr (force_evaluation_order (TREE_VALUE (arg)));
++ /* Promote types smaller than integer. This is required by
++ some ABIs. */
++ tree saved;
++ tree type = TREE_TYPE (TREE_VALUE (arg));
++ if (targetm.calls.promote_prototypes (type)
++ && INTEGRAL_TYPE_P (type)
++ && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
++ TYPE_SIZE (integer_type_node)))
++ TREE_VALUE (arg)
++ = fold_convert (integer_type_node, TREE_VALUE (arg));
++
++ saved = save_expr (force_evaluation_order (TREE_VALUE (arg)));
+ cmp = (cmp == NULL_TREE ? saved :
+ build2 (COMPOUND_EXPR, void_type_node, cmp, saved));
+ TREE_VALUE (arg) = saved;
--- gcc/java/java-except.h 12 Feb 2005 15:21:14 -0000 1.18
-+++ gcc/java/java-except.h 19 Apr 2005 09:52:20 -0000 1.19
++++ gcc/java/java-except.h 28 Apr 2005 16:35:22 -0000 1.18.4.1
@@ -54,8 +54,6 @@ struct eh_range
/* The TRY_CATCH_EXPR for this EH range. */
@@ -36,7 +71,14 @@
extern void expand_end_java_handler (struct eh_range *);
+extern bool sanity_check_exception_range (struct eh_range *);
--- gcc/java/except.c 3 Dec 2004 18:11:21 -0000 1.47
-+++ gcc/java/except.c 19 Apr 2005 15:45:28 -0000 1.49
++++ gcc/java/except.c 28 Apr 2005 16:35:22 -0000 1.47.10.1
+@@ -1,5 +1,5 @@
+ /* Handle exceptions for GNU compiler for the Java(TM) language.
+- Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
++ Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
+ This file is part of GCC.
@@ -42,7 +42,6 @@ The Free Software Foundation is independ
static void expand_start_java_handler (struct eh_range *);
static struct eh_range *find_handler_in_range (int, struct eh_range *,
@@ -54,7 +96,7 @@
/* These variables are used to speed up find_handler. */
static int cache_range_start, cache_range_end;
-@@ -62,12 +59,60 @@ static struct eh_range *cache_next_child
+@@ -62,12 +59,61 @@ static struct eh_range *cache_next_child
struct eh_range whole_range;
@@ -76,6 +118,7 @@
+ && ptr->end_pc <= ptr->outer->end_pc);
+ (void) sanity_check_exception_range (ptr);
+ }
++
+ return true;
+}
+
@@ -106,18 +149,18 @@
+ fprintf (stderr, " type=%s ", IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))));
+ }
+ fprintf (stderr, "\n");
-
++
+ int saved = binding_depth;
+ binding_depth++;
+ print_ranges (child);
+ binding_depth = saved;
-+
+
+ print_ranges (range->next_sibling);
+}
#endif
/* Search for the most specific eh_range containing PC.
-@@ -117,114 +162,6 @@ find_handler (int pc)
+@@ -117,114 +163,6 @@ find_handler (int pc)
return find_handler_in_range (pc, h, cache_next_child);
}
@@ -232,7 +275,7 @@
static void
free_eh_ranges (struct eh_range *range)
{
-@@ -252,55 +189,166 @@ method_init_exceptions (void)
+@@ -252,55 +190,166 @@ method_init_exceptions (void)
cache_range_start = 0xFFFFFF;
}
@@ -285,7 +328,7 @@
+ first_child = &range->first_child;
+ second_child = &h->first_child;
+
-+ /* Distribute the sub-ranges between the two new ranges. */
++ /* Distribute the sub-ranges bewteen the two new ranges. */
+ for (ptr = range->first_child; ptr; ptr = ptr->next_sibling)
+ {
+ if (ptr->start_pc < pc)
@@ -427,8 +470,8 @@
/* if there are any handlers for this range, issue start of region */
static void
expand_start_java_handler (struct eh_range *range)
---- gcc/java/verify-glue.c 7 Mar 2005 21:10:49 -0000 1.5
-+++ gcc/java/verify-glue.c 19 Apr 2005 09:52:21 -0000 1.6
+--- gcc/java/verify-glue.c 7 Mar 2005 21:37:34 -0000 1.4.2.1
++++ gcc/java/verify-glue.c 28 Apr 2005 16:35:22 -0000 1.4.2.2
@@ -487,7 +487,7 @@ verify_jvm_instructions_new (JCF *jcf, c
instruction_bits[handler_pc] |= BCODE_EXCEPTION_TARGET;
}
@@ -439,8 +482,48 @@
method.method = current_function_decl;
method.signature = build_java_signature (TREE_TYPE (current_function_decl));
--- gcc/java/verify.c 10 Jan 2005 18:14:36 -0000 1.69
-+++ gcc/java/verify.c 19 Apr 2005 09:52:20 -0000 1.70
-@@ -491,7 +491,6 @@ verify_jvm_instructions (JCF* jcf, const
++++ gcc/java/verify.c 28 Apr 2005 16:35:22 -0000 1.69.10.1
+@@ -45,7 +45,6 @@ static void push_pending_label (tree);
+ static tree merge_types (tree, tree);
+ static const char *check_pending_block (tree);
+ static void type_stack_dup (int, int);
+-static int start_pc_cmp (const void *, const void *);
+ static char *pop_argument_types (tree);
+
+ extern int stack_pointer;
+@@ -346,15 +345,6 @@ struct pc_index
+ int index;
+ };
+
+-/* A helper that is used when sorting exception ranges. */
+-static int
+-start_pc_cmp (const void *xp, const void *yp)
+-{
+- const struct pc_index *x = (const struct pc_index *) xp;
+- const struct pc_index *y = (const struct pc_index *) yp;
+- return x->start_pc - y->start_pc;
+-}
+-
+ /* This causes the next iteration to ignore the next instruction
+ and look for some other unhandled instruction. */
+ #define INVALIDATE_PC (prevpc = -1, oldpc = PC, PC = INVALID_PC)
+@@ -448,15 +438,12 @@ verify_jvm_instructions (JCF* jcf, const
+ JCF_SEEK (jcf, DECL_CODE_OFFSET (current_function_decl) + length);
+ eh_count = JCF_readu2 (jcf);
+
+- /* We read the exception handlers in order of increasing start PC.
+- To do this we first read and sort the start PCs. */
+ starts = xmalloc (eh_count * sizeof (struct pc_index));
+ for (i = 0; i < eh_count; ++i)
+ {
+ starts[i].start_pc = GET_u2 (jcf->read_ptr + 8 * i);
+ starts[i].index = i;
+ }
+- qsort (starts, eh_count, sizeof (struct pc_index), start_pc_cmp);
+
+ for (i = 0; i < eh_count; ++i)
+ {
+@@ -491,7 +478,6 @@ verify_jvm_instructions (JCF* jcf, const
}
free (starts);
gcc4-struct-layout.patch:
struct-layout-1.h | 155 +++++++++++++++++++++++++++++++++++++++++++++
struct-layout-1_generate.c | 109 ++++++++++++++++++++++++++++++-
2 files changed, 259 insertions(+), 5 deletions(-)
Index: gcc4-struct-layout.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4-struct-layout.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc4-struct-layout.patch 12 Apr 2005 23:02:26 -0000 1.1
+++ gcc4-struct-layout.patch 28 Apr 2005 17:32:52 -0000 1.2
@@ -1,484 +1,9 @@
2005-04-12 Jakub Jelinek <jakub at redhat.com>
- * gcc.dg/compat/struct-layout-1_generate.c: In arrays avoid types
+ * g++.dg/compat/struct-layout-1_generate.c: In arrays avoid types
where sizeof (type) < __alignof__ (type).
- * gcc.dg/compat/struct-layout-1.h: Likewise.
- * g++.dg/compat/struct-layout-1_generate.c: Likewise.
* g++.dg/compat/struct-layout-1.h: Likewise.
---- gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c.jj 2004-11-07 12:36:41.000000000 +0100
-+++ gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c 2005-04-11 17:47:45.000000000 +0200
-@@ -1,5 +1,5 @@
- /* Structure layout test generator.
-- Copyright (C) 2004 Free Software Foundation, Inc.
-+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- Contributed by Jakub Jelinek <jakub at redhat.com>.
-
- This file is part of GCC.
-@@ -459,6 +459,149 @@ struct types complex_attrib_types[] = {
- { "Tal16cldouble", TYPE_CFLOAT, 0, 0 }
- #define NCATYPES2 (sizeof (complex_attrib_types) / sizeof (complex_attrib_types[0]))
- };
-+struct types attrib_array_types[] = {
-+{ "Talx1char", TYPE_UINT, 127, 'C' },
-+{ "Talx1schar", TYPE_INT, 127, 'C' },
-+{ "Talx1uchar", TYPE_UINT, 255, 'C' },
-+{ "Talx1short", TYPE_INT, 32767, 'S' },
-+{ "Talx1ushort", TYPE_UINT, 65535, 'S' },
-+{ "Talx1int", TYPE_INT, 2147483647, 'I' },
-+{ "Talx1uint", TYPE_UINT, 4294967295U, 'I' },
-+{ "Talx1long", TYPE_INT, 9223372036854775807LL, 'L' },
-+{ "Talx1ulong", TYPE_UINT, 18446744073709551615ULL, 'L' },
-+{ "Talx1llong", TYPE_INT, 9223372036854775807LL, 'Q' },
-+{ "Talx1ullong", TYPE_UINT, 18446744073709551615ULL, 'Q' },
-+{ "Talx1bool", TYPE_UINT, 1, 'B' },
-+{ "Talx1ptr", TYPE_PTR, 0, 0 },
-+{ "Talx1cptr", TYPE_PTR, 0, 0 },
-+{ "Talx1iptr", TYPE_PTR, 0, 0 },
-+{ "Talx1float", TYPE_FLOAT, 0, 0 },
-+{ "Talx1double", TYPE_FLOAT, 0, 0 },
-+{ "Talx1ldouble", TYPE_FLOAT, 0, 0 },
-+{ "Talx1E0", TYPE_UENUM, 0, ' ' },
-+{ "Talx1E1", TYPE_UENUM, 1, ' ' },
-+{ "Talx1E2", TYPE_SENUM, 3, ' ' },
-+{ "Talx1E3", TYPE_SENUM, 127, ' ' },
-+{ "Talx1E4", TYPE_UENUM, 255, ' ' },
-+{ "Talx1E5", TYPE_SENUM, 32767, ' ' },
-+{ "Talx1E6", TYPE_UENUM, 65535, ' ' },
-+{ "Talx1E7", TYPE_SENUM, 2147483647, ' ' },
-+{ "Talx1E8", TYPE_UENUM, 4294967295U, ' ' },
-+{ "Talx1E9", TYPE_SENUM, 1099511627775LL, ' ' },
-+{ "Talx2short", TYPE_INT, 32767, 'S' },
-+{ "Talx2ushort", TYPE_UINT, 65535, 'S' },
-+{ "Talx2int", TYPE_INT, 2147483647, 'I' },
-+{ "Talx2uint", TYPE_UINT, 4294967295U, 'I' },
-+{ "Talx2long", TYPE_INT, 9223372036854775807LL, 'L' },
-+{ "Talx2ulong", TYPE_UINT, 18446744073709551615ULL, 'L' },
-+{ "Talx2llong", TYPE_INT, 9223372036854775807LL, 'Q' },
-+{ "Talx2ullong", TYPE_UINT, 18446744073709551615ULL, 'Q' },
-+{ "Talx2ptr", TYPE_PTR, 0, 0 },
-+{ "Talx2cptr", TYPE_PTR, 0, 0 },
-+{ "Talx2iptr", TYPE_PTR, 0, 0 },
-+{ "Talx2float", TYPE_FLOAT, 0, 0 },
-+{ "Talx2double", TYPE_FLOAT, 0, 0 },
-+{ "Talx2ldouble", TYPE_FLOAT, 0, 0 },
-+{ "Talx2E0", TYPE_UENUM, 0, ' ' },
-+{ "Talx2E1", TYPE_UENUM, 1, ' ' },
-+{ "Talx2E2", TYPE_SENUM, 3, ' ' },
-+{ "Talx2E3", TYPE_SENUM, 127, ' ' },
-+{ "Talx2E4", TYPE_UENUM, 255, ' ' },
-+{ "Talx2E5", TYPE_SENUM, 32767, ' ' },
-+{ "Talx2E6", TYPE_UENUM, 65535, ' ' },
-+{ "Talx2E7", TYPE_SENUM, 2147483647, ' ' },
-+{ "Talx2E8", TYPE_UENUM, 4294967295U, ' ' },
-+{ "Talx2E9", TYPE_SENUM, 1099511627775LL, ' ' },
-+{ "Talx4int", TYPE_INT, 2147483647, 'I' },
-+{ "Talx4uint", TYPE_UINT, 4294967295U, 'I' },
-+{ "Talx4long", TYPE_INT, 9223372036854775807LL, 'L' },
-+{ "Talx4ulong", TYPE_UINT, 18446744073709551615ULL, 'L' },
-+{ "Talx4llong", TYPE_INT, 9223372036854775807LL, 'Q' },
-+{ "Talx4ullong", TYPE_UINT, 18446744073709551615ULL, 'Q' },
-+{ "Talx4ptr", TYPE_PTR, 0, 0 },
-+{ "Talx4cptr", TYPE_PTR, 0, 0 },
-+{ "Talx4iptr", TYPE_PTR, 0, 0 },
-+{ "Talx4float", TYPE_FLOAT, 0, 0 },
-+{ "Talx4double", TYPE_FLOAT, 0, 0 },
-+{ "Talx4ldouble", TYPE_FLOAT, 0, 0 },
-+{ "Talx4E0", TYPE_UENUM, 0, ' ' },
-+{ "Talx4E1", TYPE_UENUM, 1, ' ' },
-+{ "Talx4E2", TYPE_SENUM, 3, ' ' },
-+{ "Talx4E3", TYPE_SENUM, 127, ' ' },
-+{ "Talx4E4", TYPE_UENUM, 255, ' ' },
-+{ "Talx4E5", TYPE_SENUM, 32767, ' ' },
-+{ "Talx4E6", TYPE_UENUM, 65535, ' ' },
-+{ "Talx4E7", TYPE_SENUM, 2147483647, ' ' },
-+{ "Talx4E8", TYPE_UENUM, 4294967295U, ' ' },
-+{ "Talx4E9", TYPE_SENUM, 1099511627775LL, ' ' },
-+{ "Taly8long", TYPE_INT, 9223372036854775807LL, 'L' },
-+{ "Taly8ulong", TYPE_UINT, 18446744073709551615ULL, 'L' },
-+{ "Talx8llong", TYPE_INT, 9223372036854775807LL, 'Q' },
-+{ "Talx8ullong", TYPE_UINT, 18446744073709551615ULL, 'Q' },
-+{ "Taly8ptr", TYPE_PTR, 0, 0 },
-+{ "Taly8cptr", TYPE_PTR, 0, 0 },
-+{ "Taly8iptr", TYPE_PTR, 0, 0 },
-+{ "Talx8double", TYPE_FLOAT, 0, 0 },
-+{ "Talx8ldouble", TYPE_FLOAT, 0, 0 }
-+#define NAATYPES2 (sizeof (attrib_array_types) / sizeof (attrib_array_types[0]))
-+};
-+struct types complex_attrib_array_types[] = {
-+{ "Talx1cchar", TYPE_CUINT, 127, 0 },
-+{ "Talx1cschar", TYPE_CINT, 127, 0 },
-+{ "Talx1cuchar", TYPE_CUINT, 255, 0 },
-+{ "Talx1cshort", TYPE_CINT, 32767, 0 },
-+{ "Talx1cushort", TYPE_CUINT, 65535, 0 },
-+{ "Talx1cint", TYPE_CINT, 2147483647, 0 },
-+{ "Talx1cuint", TYPE_CUINT, 4294967295U, 0 },
-+{ "Talx1clong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx1culong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx1cllong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx1cullong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx1cfloat", TYPE_CFLOAT, 0, 0 },
-+{ "Talx1cdouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx1cldouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx2cchar", TYPE_CUINT, 127, 0 },
-+{ "Talx2cschar", TYPE_CINT, 127, 0 },
-+{ "Talx2cuchar", TYPE_CUINT, 255, 0 },
-+{ "Talx2cshort", TYPE_CINT, 32767, 0 },
-+{ "Talx2cushort", TYPE_CUINT, 65535, 0 },
-+{ "Talx2cint", TYPE_CINT, 2147483647, 0 },
-+{ "Talx2cuint", TYPE_CUINT, 4294967295U, 0 },
-+{ "Talx2clong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx2culong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx2cllong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx2cullong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx2cfloat", TYPE_CFLOAT, 0, 0 },
-+{ "Talx2cdouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx2cldouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx4cshort", TYPE_CINT, 32767, 0 },
-+{ "Talx4cushort", TYPE_CUINT, 65535, 0 },
-+{ "Talx4cint", TYPE_CINT, 2147483647, 0 },
-+{ "Talx4cuint", TYPE_CUINT, 4294967295U, 0 },
-+{ "Talx4clong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx4culong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx4cllong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx4cullong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx4cfloat", TYPE_CFLOAT, 0, 0 },
-+{ "Talx4cdouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx4cldouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx8cint", TYPE_CINT, 2147483647, 0 },
-+{ "Talx8cuint", TYPE_CUINT, 4294967295U, 0 },
-+{ "Talx8clong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx8culong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx8cllong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx8cullong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx8cfloat", TYPE_CFLOAT, 0, 0 },
-+{ "Talx8cdouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx8cldouble", TYPE_CFLOAT, 0, 0 },
-+{ "Taly16clong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Taly16culong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx16cllong", TYPE_CINT, 9223372036854775807LL, 0 },
-+{ "Talx16cullong", TYPE_CUINT, 18446744073709551615ULL, 0 },
-+{ "Talx16cdouble", TYPE_CFLOAT, 0, 0 },
-+{ "Talx16cldouble", TYPE_CFLOAT, 0, 0 }
-+#define NCAATYPES2 (sizeof (complex_attrib_array_types) / sizeof (complex_attrib_array_types[0]))
-+};
-
- struct types bitfld_types[NTYPES2];
- int n_bitfld_types;
-@@ -1153,7 +1296,7 @@ singles (enum FEATURE features)
- }
-
- void
--choose_type (enum FEATURE features, struct entry *e, int r)
-+choose_type (enum FEATURE features, struct entry *e, int r, int in_array)
- {
- int i;
-
-@@ -1164,9 +1307,18 @@ choose_type (enum FEATURE features, stru
- i += NVTYPES2;
- if ((r & 3) == 0)
- {
-- i += NATYPES2;
-- if (features & FEATURE_COMPLEX)
-- i += NCATYPES2;
-+ if (in_array)
-+ {
-+ i += NAATYPES2;
-+ if (features & FEATURE_COMPLEX)
-+ i += NCAATYPES2;
-+ }
-+ else
-+ {
-+ i += NATYPES2;
-+ if (features & FEATURE_COMPLEX)
-+ i += NCATYPES2;
-+ }
- }
- r >>= 2;
- r %= i;
-@@ -1185,18 +1337,30 @@ choose_type (enum FEATURE features, stru
- e->type = &vector_types[r];
- r -= NVTYPES2;
- }
-- if (e->type == NULL)
-+ if (e->type == NULL && !in_array)
- {
- if (r < NATYPES2)
- e->type = &attrib_types[r];
- r -= NATYPES2;
- }
-- if (e->type == NULL && (features & FEATURE_COMPLEX))
-+ if (e->type == NULL && !in_array && (features & FEATURE_COMPLEX))
- {
- if (r < NCATYPES2)
- e->type = &complex_attrib_types[r];
- r -= NCATYPES2;
- }
-+ if (e->type == NULL && in_array)
-+ {
-+ if (r < NAATYPES2)
-+ e->type = &attrib_array_types[r];
-+ r -= NAATYPES2;
-+ }
-+ if (e->type == NULL && in_array && (features & FEATURE_COMPLEX))
-+ {
-+ if (r < NCAATYPES2)
-+ e->type = &complex_attrib_array_types[r];
-+ r -= NCAATYPES2;
-+ }
- if (e->type == NULL)
- abort ();
- }
-@@ -1243,7 +1407,7 @@ generate_fields (enum FEATURE features,
- break;
- case 4:
- e[n].etype = ETYPE_TYPE;
-- choose_type (features, &e[n], r);
-+ choose_type (features, &e[n], r, 0);
- break;
- case 5:
- e[n].etype = ETYPE_ARRAY;
-@@ -1252,7 +1416,7 @@ generate_fields (enum FEATURE features,
- if (i)
- e[n].type = &base_types[r % NTYPES1];
- else
-- choose_type (features, &e[n], r);
-+ choose_type (features, &e[n], r, 1);
- r = generate_random ();
- if ((features & FEATURE_ZEROARRAY) && (r & 3) == 0)
- {
-@@ -1425,6 +1589,10 @@ generate_fields (enum FEATURE features,
- && e[n].type < &attrib_types[NATYPES2])
- || (e[n].type >= &complex_attrib_types[0]
- && e[n].type < &complex_attrib_types[NCATYPES2])
-+ || (e[n].type >= &attrib_array_types[0]
-+ && e[n].type < &attrib_array_types[NAATYPES2])
-+ || (e[n].type >= &complex_attrib_array_types[0]
-+ && e[n].type < &complex_attrib_array_types[NAATYPES2])
- || (e[n].type >= &aligned_bitfld_types[0]
- && e[n].type < &aligned_bitfld_types[n_aligned_bitfld_types])))
- e[n].attrib = NULL;
---- gcc/testsuite/gcc.dg/compat/struct-layout-1.h.jj 2004-10-16 09:02:45.000000000 +0200
-+++ gcc/testsuite/gcc.dg/compat/struct-layout-1.h 2005-04-11 17:48:37.000000000 +0200
-@@ -101,6 +101,64 @@ extern int fn5 (void), fn6 (void), fn7 (
- #define atpaal8 __attribute__((packed, aligned (8)))
- #define atpaal16 __attribute__((packed, aligned (16)))
-
-+#if UCHAR_MAX == 255 && USHORT_MAX == 65535 && UINT_MAX == 4294967295U \
-+ && ULLONG_MAX == 18446744073709551615ULL
-+/* For ILP32 and LP64 targets, assume float is at least 32-bit
-+ and double plus long double at least 64-bit. */
-+# define atalx1 atal1
-+# define atalx2 atal2
-+# define atalx4 atal4
-+# define atalx8 atal8
-+# define atalx16 atal16
-+# define atalx1pa atal1pa
-+# define atalx2pa atal2pa
-+# define atalx4pa atal4pa
-+# define atalx8pa atal8pa
-+# define atalx16pa atal16pa
-+# define atpaalx1 atpaal1
-+# define atpaalx2 atpaal2
-+# define atpaalx4 atpaal4
-+# define atpaalx8 atpaal8
-+# define atpaalx16 atpaal16
-+# if ULONG_MAX > 4294967295UL
-+# define ataly8 atal8
-+# define ataly8pa atal8pa
-+# define atpaaly8 atpaal8
-+# define ataly16 atal16
-+# define ataly16pa atal16pa
-+# define atpaaly16 atpaal16
-+# else
-+# define ataly8
-+# define ataly8pa
-+# define atpaaly8
-+# define ataly16
-+# define ataly16pa
-+# define atpaaly16
-+# endif
-+#else
-+# define atalx1
-+# define atalx2
-+# define atalx4
-+# define atalx8
-+# define atalx16
-+# define atalx1pa
-+# define atalx2pa
-+# define atalx4pa
-+# define atalx8pa
-+# define atalx16pa
-+# define atpaalx1
-+# define atpaalx2
-+# define atpaalx4
-+# define atpaalx8
-+# define atpaalx16
-+# define ataly8
-+# define ataly8pa
-+# define atpaaly8
-+# define ataly16
-+# define ataly16pa
-+# define atpaaly16
-+#endif
-+
- #define atQI __attribute__((mode (QI)))
- #define atHI __attribute__((mode (HI)))
- #define atSI __attribute__((mode (SI)))
-@@ -427,6 +485,153 @@ typedef enum E9 Tal16E9 atal16;
- typedef void *Tal16ptr atal16;
- typedef char *Tal16cptr atal16;
- typedef int *Tal16iptr atal16;
-+typedef char Talx1char atalx1;
-+typedef signed char Talx1schar atalx1;
-+typedef unsigned char Talx1uchar atalx1;
-+typedef short int Talx1short atalx1;
-+typedef unsigned short int Talx1ushort atalx1;
-+typedef int Talx1int atalx1;
-+typedef unsigned int Talx1uint atalx1;
-+typedef long int Talx1long atalx1;
-+typedef unsigned long int Talx1ulong atalx1;
-+typedef long long int Talx1llong atalx1;
-+typedef unsigned long long int Talx1ullong atalx1;
-+#ifndef SKIP_COMPLEX_INT
-+typedef _Complex char Talx1cchar atalx1;
-+typedef _Complex signed char Talx1cschar atalx1;
-+typedef _Complex unsigned char Talx1cuchar atalx1;
-+typedef _Complex short int Talx1cshort atalx1;
-+typedef _Complex unsigned short int Talx1cushort atalx1;
-+typedef _Complex int Talx1cint atalx1;
-+typedef _Complex unsigned int Talx1cuint atalx1;
-+typedef _Complex long int Talx1clong atalx1;
-+typedef _Complex unsigned long int Talx1culong atalx1;
-+typedef _Complex long long int Talx1cllong atalx1;
-+typedef _Complex unsigned long long int Talx1cullong atalx1;
-+#endif
-+typedef float Talx1float atalx1;
-+typedef double Talx1double atalx1;
-+typedef long double Talx1ldouble atalx1;
-+typedef _Complex float Talx1cfloat atalx1;
-+typedef _Complex double Talx1cdouble atalx1;
-+typedef _Complex long double Talx1cldouble atalx1;
-+typedef bool Talx1bool atalx1;
-+typedef enum E0 Talx1E0 atalx1;
-+typedef enum E1 Talx1E1 atalx1;
-+typedef enum E2 Talx1E2 atalx1;
-+typedef enum E3 Talx1E3 atalx1;
-+typedef enum E4 Talx1E4 atalx1;
-+typedef enum E5 Talx1E5 atalx1;
-+typedef enum E6 Talx1E6 atalx1;
-+typedef enum E7 Talx1E7 atalx1;
-+typedef enum E8 Talx1E8 atalx1;
-+typedef enum E9 Talx1E9 atalx1;
-+typedef void *Talx1ptr atalx1;
-+typedef char *Talx1cptr atalx1;
-+typedef int *Talx1iptr atalx1;
-+typedef short int Talx2short atalx2;
-+typedef unsigned short int Talx2ushort atalx2;
-+typedef int Talx2int atalx2;
-+typedef unsigned int Talx2uint atalx2;
-+typedef long int Talx2long atalx2;
-+typedef unsigned long int Talx2ulong atalx2;
-+typedef long long int Talx2llong atalx2;
-+typedef unsigned long long int Talx2ullong atalx2;
-+#ifndef SKIP_COMPLEX_INT
-+typedef _Complex char Talx2cchar atalx2;
-+typedef _Complex signed char Talx2cschar atalx2;
-+typedef _Complex unsigned char Talx2cuchar atalx2;
-+typedef _Complex short int Talx2cshort atalx2;
-+typedef _Complex unsigned short int Talx2cushort atalx2;
-+typedef _Complex int Talx2cint atalx2;
-+typedef _Complex unsigned int Talx2cuint atalx2;
-+typedef _Complex long int Talx2clong atalx2;
-+typedef _Complex unsigned long int Talx2culong atalx2;
-+typedef _Complex long long int Talx2cllong atalx2;
-+typedef _Complex unsigned long long int Talx2cullong atalx2;
-+#endif
-+typedef float Talx2float atalx2;
-+typedef double Talx2double atalx2;
-+typedef long double Talx2ldouble atalx2;
-+typedef _Complex float Talx2cfloat atalx2;
-+typedef _Complex double Talx2cdouble atalx2;
-+typedef _Complex long double Talx2cldouble atalx2;
-+typedef enum E0 Talx2E0 atalx2;
-+typedef enum E1 Talx2E1 atalx2;
-+typedef enum E2 Talx2E2 atalx2;
-+typedef enum E3 Talx2E3 atalx2;
-+typedef enum E4 Talx2E4 atalx2;
-+typedef enum E5 Talx2E5 atalx2;
-+typedef enum E6 Talx2E6 atalx2;
-+typedef enum E7 Talx2E7 atalx2;
-+typedef enum E8 Talx2E8 atalx2;
-+typedef enum E9 Talx2E9 atalx2;
-+typedef void *Talx2ptr atalx2;
-+typedef char *Talx2cptr atalx2;
-+typedef int *Talx2iptr atalx2;
-+typedef int Talx4int atalx4;
-+typedef unsigned int Talx4uint atalx4;
-+typedef long int Talx4long atalx4;
-+typedef unsigned long int Talx4ulong atalx4;
-+typedef long long int Talx4llong atalx4;
-+typedef unsigned long long int Talx4ullong atalx4;
-+#ifndef SKIP_COMPLEX_INT
-+typedef _Complex short int Talx4cshort atalx4;
-+typedef _Complex unsigned short int Talx4cushort atalx4;
-+typedef _Complex int Talx4cint atalx4;
-+typedef _Complex unsigned int Talx4cuint atalx4;
-+typedef _Complex long int Talx4clong atalx4;
-+typedef _Complex unsigned long int Talx4culong atalx4;
-+typedef _Complex long long int Talx4cllong atalx4;
-+typedef _Complex unsigned long long int Talx4cullong atalx4;
-+#endif
-+typedef float Talx4float atalx4;
-+typedef double Talx4double atalx4;
-+typedef long double Talx4ldouble atalx4;
-+typedef _Complex float Talx4cfloat atalx4;
-+typedef _Complex double Talx4cdouble atalx4;
-+typedef _Complex long double Talx4cldouble atalx4;
-+typedef enum E0 Talx4E0 atalx4;
-+typedef enum E1 Talx4E1 atalx4;
-+typedef enum E2 Talx4E2 atalx4;
-+typedef enum E3 Talx4E3 atalx4;
-+typedef enum E4 Talx4E4 atalx4;
-+typedef enum E5 Talx4E5 atalx4;
-+typedef enum E6 Talx4E6 atalx4;
-+typedef enum E7 Talx4E7 atalx4;
-+typedef enum E8 Talx4E8 atalx4;
-+typedef enum E9 Talx4E9 atalx4;
-+typedef void *Talx4ptr atalx4;
-+typedef char *Talx4cptr atalx4;
-+typedef int *Talx4iptr atalx4;
-+typedef long int Taly8long ataly8;
-+typedef unsigned long int Taly8ulong ataly8;
-+typedef long long int Talx8llong atalx8;
-+typedef unsigned long long int Talx8ullong atalx8;
-+#ifndef SKIP_COMPLEX_INT
-+typedef _Complex int Talx8cint atalx8;
-+typedef _Complex unsigned int Talx8cuint atalx8;
-+typedef _Complex long int Talx8clong atalx8;
-+typedef _Complex unsigned long int Talx8culong atalx8;
-+typedef _Complex long long int Talx8cllong atalx8;
-+typedef _Complex unsigned long long int Talx8cullong atalx8;
-+#endif
-+typedef double Talx8double atalx8;
-+typedef long double Talx8ldouble atalx8;
-+typedef _Complex float Talx8cfloat atalx8;
-+typedef _Complex double Talx8cdouble atalx8;
-+typedef _Complex long double Talx8cldouble atalx8;
-+typedef void *Taly8ptr ataly8;
-+typedef char *Taly8cptr ataly8;
-+typedef int *Taly8iptr ataly8;
-+#ifndef SKIP_COMPLEX_INT
-+typedef _Complex long int Taly16clong ataly16;
-+typedef _Complex unsigned long int Taly16culong ataly16;
-+typedef _Complex long long int Talx16cllong atalx16;
-+typedef _Complex unsigned long long int Talx16cullong atalx16;
-+#endif
-+typedef _Complex double Talx16cdouble atalx16;
-+typedef _Complex long double Talx16cldouble atalx16;
- typedef int (*Tfnptr) (void);
-
- /* Bitfield macros. In C, it is invalid to use numbers larger
--- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c.jj 2004-11-07 12:36:41.000000000 +0100
+++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2005-04-11 17:47:45.000000000 +0200
@@ -391,6 +391,92 @@ struct entry
Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- gcc4.spec 23 Apr 2005 20:08:17 -0000 1.32
+++ gcc4.spec 28 Apr 2005 17:32:52 -0000 1.33
@@ -1,6 +1,6 @@
-%define DATE 20050423
+%define DATE 20050428
%define gcc_version 4.0.0
-%define gcc_release 1
+%define gcc_release 2
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} alpha ia64 x86_64 s390
@@ -76,23 +76,19 @@
Patch4: gcc4-gnuc-rh-release.patch
Patch5: gcc4-java-nomulti.patch
Patch6: gcc4-c++-pr19317.patch
-Patch8: gcc4-pr20249.patch
-Patch9: gcc4-g++-struct-layout.patch
-Patch10: gcc4-pr16104-test.patch
-Patch11: gcc4-gfortran-pr13082.patch
-Patch12: gcc4-gfortran-pr18824.patch
-Patch13: gcc4-gfortran-pr13082-mixed.patch
-Patch14: gcc4-gfortran-entry-character.patch
-Patch15: gcc4-pr20768.patch
-Patch16: gcc4-pr20490.patch
-Patch17: gcc4-libstdc++-mt-alloc.patch
-Patch18: gcc4-pr20991.patch
-Patch19: gcc4-struct-layout.patch
-Patch20: gcc4-ppc32-hwint32.patch
-Patch21: gcc4-pr20742.patch
-Patch22: gcc4-pr21102.patch
-Patch23: gcc4-pr21099.patch
-Patch24: gcc4-pr21173.patch
+Patch7: gcc4-pr20249.patch
+Patch8: gcc4-g++-struct-layout.patch
+Patch9: gcc4-pr16104-test.patch
+Patch10: gcc4-pr20768.patch
+Patch11: gcc4-pr20490.patch
+Patch12: gcc4-libstdc++-mt-alloc.patch
+Patch13: gcc4-struct-layout.patch
+Patch14: gcc4-ppc32-hwint32.patch
+Patch15: gcc4-pr20742.patch
+Patch16: gcc4-gfortran-entry.patch
+Patch17: gcc4-gfortran-namelist.patch
+Patch18: gcc4-java-awt-thread-init.patch
+Patch19: gcc4-java-x509-extension.patch
%define _gnu %{nil}
%ifarch sparc
@@ -408,23 +404,19 @@
%patch4 -p0 -b .gnuc-rh-release~
%patch5 -p0 -b .java-nomulti~
%patch6 -p0 -b .c++-pr19317~
-%patch8 -p0 -b .pr20249~
-%patch9 -p0 -b .g++-struct-layout~
-%patch10 -p0 -b .pr16104-test~
-%patch11 -p0 -b .gfortran-pr13082~
-%patch12 -p0 -b .gfortran-pr18824~
-%patch13 -p0 -b .gfortran-pr13082-mixed~
-%patch14 -p0 -b .gfortran-entry-character~
-%patch15 -p0 -b .pr20768~
-%patch16 -p0 -b .pr20490~
-%patch17 -p0 -b .libstdc++-mt-alloc~
-%patch18 -p0 -b .pr20991~
-%patch19 -p0 -b .struct-layout~
-#%patch20 -p0 -b .ppc32-hwint32~
-%patch21 -p0 -b .pr20742~
-%patch22 -p0 -b .pr21102~
-%patch23 -p0 -b .pr21099~
-%patch24 -p0 -b .pr21173~
+%patch7 -p0 -b .pr20249~
+%patch8 -p0 -b .g++-struct-layout~
+%patch9 -p0 -b .pr16104-test~
+%patch10 -p0 -b .pr20768~
+%patch11 -p0 -b .pr20490~
+%patch12 -p0 -b .libstdc++-mt-alloc~
+%patch13 -p0 -b .struct-layout~
+#%patch14 -p0 -b .ppc32-hwint32~
+%patch15 -p0 -b .pr20742~
+%patch16 -p0 -b .gfortran-entry~
+%patch17 -p0 -b .gfortran-namelist~
+%patch18 -p0 -b .java-awt-thread-init~
+%patch19 -p0 -b .java-x509-extension~
perl -pi -e 's/4\.0\.0/4.0.0/' gcc/version.c
perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
@@ -1271,7 +1263,9 @@
%{_prefix}/%{_lib}/libjawt.so.*
%dir %{_prefix}/share/java
%{_prefix}/share/java/[^s]*
-%{_prefix}/lib/security
+%dir %{_prefix}/lib/security
+%config(noreplace) %{_prefix}/lib/security/classpath.security
+%config(noreplace) %{_prefix}/lib/security/libgcj.security
%{_prefix}/lib/logging.properties
%dir %{_prefix}/%{_lib}/gcj-%{version}
%dir %{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
@@ -1417,6 +1411,23 @@
%endif
%changelog
+* Thu Apr 28 2005 Jakub Jelinek <jakub at redhat.com> 4.0.0-2
+- update from CVS
+ - PRs ada/18847, bootstrap/21215, c++/21087, c/20740, c/21159, c/21213,
+ fortran/20059, fortran/20865, fortran/20879, fortran/21177,
+ libfortran/20950, libgcj/21233:, libstdc++/20914, libstdc++/21035,
+ libstdc++/21131, libstdc++/21244, preprocessor/20907, rtl-opt/21163,
+ target/17822, target/17824, target/21100, target/21101
+ - https Handler.java from GNU classpath (Thomas Fitzsimmons, #155466)
+- Fortran namelist support (Paul Thomas, #155852, PRs fortran/17472,
+ fortran/18396, fortran/19467, libfortran/12884, libfortran/17285,
+ libfortran/18122, libfortran/18209, libfortran/18210, libfortran/18392,
+ libfortran/18591, libfortran/18879, libfortran/19657)
+- fixes for the Fortran ENTRY support (PRs fortran/13082, fortran/18824, #153715)
+- make %{_prefix}/lib/security/*.security %%config(noreplace) (Thomas Fitzsimmons)
+- fix GThread errors when running OOo (Thomas Fitzsimmons, #154215)
+- fix promotion of outgoing arguments (Andrew Haley, PR java/21115)
+
* Sat Apr 23 2005 Jakub Jelinek <jakub at redhat.com> 4.0.0-1
- update from CVS
- GCC 4.0.0 release
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- sources 23 Apr 2005 18:04:19 -0000 1.87
+++ sources 28 Apr 2005 17:32:52 -0000 1.88
@@ -1 +1 @@
-b9c0454fd17eb4465ee2792885c10f34 gcc-4.0.0-20050423.tar.bz2
+da54cb1085690d869187cffe682947d2 gcc-4.0.0-20050428.tar.bz2
--- gcc4-gfortran-entry-character.patch DELETED ---
--- gcc4-gfortran-pr13082-mixed.patch DELETED ---
--- gcc4-gfortran-pr13082.patch DELETED ---
--- gcc4-gfortran-pr18824.patch DELETED ---
--- gcc4-pr20991.patch DELETED ---
--- gcc4-pr21099.patch DELETED ---
--- gcc4-pr21102.patch DELETED ---
--- gcc4-pr21173.patch DELETED ---
More information about the fedora-cvs-commits
mailing list