diff options
| author | Jose E. Marchesi <jemarch@gnu.org> | 2026-02-01 22:49:12 +0100 |
|---|---|---|
| committer | Jose E. Marchesi <jemarch@gnu.org> | 2026-02-01 22:57:48 +0100 |
| commit | 074bc16d15bff6f857c14f9e383f6ac3103a1606 (patch) | |
| tree | 383f84e89cfb6d2ec037e14be9c18d60b1ad0aa1 /libjava/classpath/java | |
| parent | e7853d31dd723eb8a1cb5ce34fad638fd255d9a8 (diff) | |
| download | gcc-074bc16d15bff6f857c14f9e383f6ac3103a1606.zip gcc-074bc16d15bff6f857c14f9e383f6ac3103a1606.tar.gz gcc-074bc16d15bff6f857c14f9e383f6ac3103a1606.tar.bz2 | |
a68: avoid indirect calls to publicized C functions
Publicized identifiers of proc modes with the form:
pub proc(int)int fclose = nest C "_libga68_posixclose"
currently results in a export like:
iden extract: POSIX_fclose [*.LMD11] variable=0 inproc=0
Note how the "inproc" export flag is not set. This causes the
resulting applied identifier in calls to fclose to be lowered to a
VAR_DECL rather than a FUNCTION_DECL, resulting in an indirect call.
This patch makes the parser to mark identity declarations of proc
modes whose actual parameters are formal holes as "inproc".
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog
* a68.h: Prototype for a68_make_proc_formal_hole_decl.
* a68-parser-extract.cc (extract_identities): Mark identity
declarations of proc modes whose actual parameter is a formal hole
as "inproc".
* a68-low.cc (a68_make_proc_formal_hole_decl): New function.
* a68-low-units.cc (a68_lower_formal_hole): Call
a68_make_proc_formal_hole_decl whenever necessary.
Diffstat (limited to 'libjava/classpath/java')
0 files changed, 0 insertions, 0 deletions
