diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-27 14:26:43 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-27 14:26:43 +0000 |
commit | dfdf77878096582514666fe5be368386860c794e (patch) | |
tree | 6147088e80b2ea736c45bd8f73774d61784096d3 /libgfortran/runtime | |
parent | 06ae9c5b7fd3e3f7bbd41fa6958b7d1b685cda17 (diff) | |
download | gcc-dfdf77878096582514666fe5be368386860c794e.tar.gz |
PR fortran/32035
* trans-stmt.c (gfc_trans_character_select): Replace the
mechanism with labels by a SWITCH_EXPR.
* trans-decl.c (gfc_build_builtin_function_decls): Change
return type for select_string.
* runtime/select.c (select_string): Adjust prototype and function
so that the return value is an integer, not a pointer.
* gfortran.dg/select_char_1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/select.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libgfortran/runtime/select.c b/libgfortran/runtime/select.c index 4421e024ced..cecd0254118 100644 --- a/libgfortran/runtime/select.c +++ b/libgfortran/runtime/select.c @@ -35,28 +35,28 @@ typedef struct int low_len; char *high; int high_len; - void *address; + int address; } select_struct; -extern void * select_string (select_struct *table, int table_len, - void *default_jump, const char *selector, - int selector_len); +extern int select_string (select_struct *table, int table_len, + const char *selector, int selector_len); export_proto(select_string); /* select_string()-- Given a selector string and a table of * select_struct structures, return the address to jump to. */ -void * -select_string (select_struct *table, int table_len, void *default_jump, - const char *selector, int selector_len) +int +select_string (select_struct *table, int table_len, const char *selector, + int selector_len) { select_struct *t; int i, low, high, mid; + int default_jump; if (table_len == 0) - return default_jump; + return -1; /* Record the default address if present */ |