Commit e433bcd
committed
test/f90: fix cross-language attribute tests
It appears the old interpretation of how we store an integer value in
attribute is to store a pointer (address) to an integer. 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 76aeb9d commit e433bcd
2 files changed
+7
-65
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 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
0 commit comments