--- Comment #8 from asl at math dot spbu dot ru 2007-10-17 10:17 ---
(In reply to comment #3)
Confirmed. The same thing is true for external procedures, like:
program test
real x
external x
print *, x(2)
end program test
real function x(i)
integer i
x = i + 1
--- Comment #9 from asl at math dot spbu dot ru 2007-10-17 16:45 ---
(In reply to comment #3)
Two decls are generated for function x, the first one (inside MAIN__) doesn't
have a proper argument list while the second one is OK. When I try to make
gfortran emit only one decl per
--- Comment #10 from asl at math dot spbu dot ru 2007-10-17 16:46 ---
Created an attachment (id=14365)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14365action=view)
Patch to mark external decls to be varargs
--
asl at math dot spbu dot ru changed:
What|Removed
--- Comment #11 from asl at math dot spbu dot ru 2007-10-17 17:00 ---
Also, some chunk of code in function type creation (gfc_get_function_type() is
in question) looks suspicious to me. Let me explain on terms of C (I don't know
Fortran at all :) )
Consider we have two function decls
--- Comment #13 from asl at math dot spbu dot ru 2007-10-17 17:27 ---
(In reply to comment #12)
(In reply to comment #11)
void foo2(some_fat_struct *ptr); but:
int foo(...);
This looks pretty unlogical to me. Was it intentional?
Yes, I think that's intentional. Why
--- Comment #3 from asl at math dot spbu dot ru 2007-10-04 05:15 ---
The testcase is slightly uninformative.
Note, that %esp is aligned here and %ebp is potentially not (thus locals are
accessed via %esp).
What if:
1. We have dinamic size alloca() call
2. We have incoming arguments
--- Comment #4 from asl at math dot spbu dot ru 2007-10-04 05:26 ---
Answers:
icc aligns stack depending on external conditions. If there is dynamic size
alloca it emits the same code as gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28074
--- Comment #4 from asl at math dot spbu dot ru 2007-08-20 16:46 ---
Ooops, attached patch is not complete. I also need:
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -1027,7 +1027,7
--- Comment #5 from asl at math dot spbu dot ru 2007-08-20 16:47 ---
(In reply to comment #3)
Two decls are generated for function x, the first one (inside MAIN__) doesn't
have a proper argument list while the second one is OK. When I try to make
gfortran emit only one decl per
--- Comment #7 from asl at math dot spbu dot ru 2007-08-20 17:00 ---
Well, I haven't seen this. The only segfault I've seen was in trans-types.c
(patch mentioned)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: asl at math dot spbu dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097
--- Comment #1 from asl at math dot spbu dot ru 2007-08-17 12:42 ---
Created an attachment (id=14069)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14069action=view)
Quick and dirty patch
Attached is quick and dirty patch to populate symbol with arguments. It seems
--- Comment #2 from asl at math dot spbu dot ru 2007-08-17 12:49 ---
Quick example of the problem:
function_decl 0x4bf6d00 _gfortran_matmul_r4
type function_type 0x52495a0
type void_type 0x4419840 void VOID
align 8 symtab 6 alias set -1
LLVM
13 matches
Mail list logo