> > I still get implicitly declared errors for a couple of functions declared
> > in ia64-protos.h. I think the patch needs to be expanded to include
> > tm_p.h in addition to tm.h. I am testing that now.
>
> Shall I help? I have a fast sunfire here where I can cross check.
>
> I wait until you come up, then we can put it in together, ok?
>
> Andreas
I took Zack's advice and put all the includes from insn-attrtab.c into
insn-automata.c. My current problem is that I get:
| insn-automata.c: In function 'print_reservation':
| insn-automata.c:22466: warning: string length '669' is greater than the
length '
| 509' ISO C89 compilers are required to support
| make[3]: *** [insn-automata.o] Error 1
| make[3]: Target `all' not remade because of errors.
Here is the patch I used:
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c (revision 110102)
+++ gcc/varasm.c (working copy)
@@ -1860,12 +1860,9 @@ assemble_name_raw (FILE *file, const cha
void
assemble_name (FILE *file, const char *name)
{
- const char *real_name;
tree id;
- real_name = targetm.strip_name_encoding (name);
-
- id = maybe_get_identifier (real_name);
+ id = maybe_get_identifier (name);
if (id)
{
tree id_orig = id;
Index: gcc/testsuite/gcc.target/ia64/asm-decl.c
===================================================================
--- gcc/testsuite/gcc.target/ia64/asm-decl.c (revision 0)
+++ gcc/testsuite/gcc.target/ia64/asm-decl.c (revision 0)
@@ -0,0 +1,13 @@
+/* Make sure a function with __asm__ name gets declared properly. */
+/* { dg-do compile { target ia64*-*-hpux* } } */
+/* { dg-final { scan-assembler "\\.global.*foobar" } } */
+/* { dg-final { scan-assembler "\\.type.*foobar.*function" } } */
+
+extern double bar (void);
+extern double bar (void) __asm__ ("foobar");
+
+double
+foo (void)
+{
+ return bar ();
+}