Commit 129f82b
committed
test/f90: fix f90/attr/attrlangc
It appears the old interpretation of how we store an integer value in
attribute is to store a pointer (address) to an interger. This creates
the ridiculous case when we retrieve a attribute value set in Fortran,
we need *guess* whether the integer attr is set in F77 or F90 and cast
the returned attr from (void *) to either (int *) or (MPI_Aint *).
In an alternate interpretation, we simply store an integer as a scalar.
If we retrieve the integer from C, simply cast the (void *) into an
integer. Integer cast is always safe! Simply, the new interpretation
always treats an attribute as a scalar value (including ptr address).
There is no way to implement the old interpretation with a C MPI ABI.
Note, the new interpretation only affects applications that want to
retrieve an attribute set in Fortran but get in C. I don't think we have
any real applications involving such case.1 parent 3aa9d8d commit 129f82b
1 file changed
+3
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
| 577 | + | |
607 | 578 | | |
608 | 579 | | |
609 | 580 | | |
610 | 581 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
| 582 | + | |
641 | 583 | | |
642 | 584 | | |
643 | 585 | | |
644 | 586 | | |
645 | | - | |
646 | | - | |
| 587 | + | |
647 | 588 | | |
0 commit comments