Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with sub position #441

Open
adipi71 opened this issue Jun 7, 2022 · 4 comments
Open

Problem with sub position #441

adipi71 opened this issue Jun 7, 2022 · 4 comments
Assignees

Comments

@adipi71
Copy link

adipi71 commented Jun 7, 2022

Problem with sub position

Is the sub position in perl code a problem for -MO:CC ?
The problem below is not present for -MO=C

Thank you in advance
Adriano

correct code

file: test.pl

sub hi{    print "hello\n"; }
hi();

is compiled correctly with
perl -MO=CC test.pl > out.c

wrong code

file: test.pl

hi();
sub hi{    print "hello\n"; }

creates warning

$ perl -MO=CC  test.pl > out.c
Warning: Label not found at compile time for "last GETFILE"
Warning: Label not found at compile time for "last GETFILE"
test.pl syntax OK

and the compiled file creates segmentation fault

x86_64-linux-gnu-gcc -g -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -o test out.c -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -lperl -ldl -lm -lpthread -lc -lcrypt

@rurban
Copy link
Owner

rurban commented Jun 7, 2022

That's a B:CC bug, thanks

@rurban
Copy link
Owner

rurban commented Jun 7, 2022

works ok with cperl5.30. perl5 is broken since 5.26

@adipi71
Copy link
Author

adipi71 commented Jun 7, 2022

works ok with cperl5.30. perl5 is broken since 5.26

I've got perl 5.30 and it doesn't work

$ perl -v
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 50 registered patches, see perl -V for more detail)
...

Is your same version?
Thank you for taking in consideration this issue
Adriano

@adipi71
Copy link
Author

adipi71 commented Jun 7, 2022

Sorry,
I didn't understand you were mentioning cperl
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants