public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
	  "'fortran@gcc.gnu.org'" <fortran@gcc.gnu.org>
Subject: [Patch, Fortran] PR34246 - Fix for character bind(C) functions
Date: Sun, 09 Dec 2007 22:40:00 -0000	[thread overview]
Message-ID: <475C6EEC.10601@net-b.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

I implemented a while a go a patch which should generate for
   character(len=1,kind=c_char) function foo() bind(C)
an interface matching the C prototype
  char foo()

However, the test case failed on some systems (e.g. working on x86-64
but failing on x86-32). It turned out that the returned value was still
regarded as array by the middle end.

The attached patch fixes this; as the patch was created on a
try-and-error bases, it should be carefully reviewed.

Build and regression tested (check-gfortran + gomp) with -m32 and -m64
on x86-64-linux.

OK for the trunk?

Tobias

[-- Attachment #2: bind-c-fixes.diff --]
[-- Type: application/unknown, Size: 6892 bytes --]

             reply	other threads:[~2007-12-09 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09 22:40 Tobias Burnus [this message]
2007-12-10 16:31 ` Tobias Burnus
2007-12-15 13:38 ` Tobias Burnus
2007-12-16 20:25 ` Jerry DeLisle
2007-12-16 20:28   ` Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475C6EEC.10601@net-b.de \
    --to=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).