re PR fortran/32801 (USE of ISO_C_BINDING, ONLY: C_LOC causes compiler seg fault)

2007-07-18  Christopher D. Rickett  <crickett@lanl.gov>

	PR fortran/32801
	* symbol.c (generate_isocbinding_symbol): Fix bug where
	ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
	ISOCBINDING_PTR.


2007-07-18  Christopher D. Rickett  <crickett@lanl.gov>

	PR fortran/32801
	* gfortran.dg/pr32801.f03: New test case.

From-SVN: r126732
This commit is contained in:
Christopher D. Rickett 2007-07-18 22:02:21 +00:00 committed by Tobias Burnus
parent 0ef0421e82
commit c00a2e6beb
4 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
* symbol.c (generate_isocbinding_symbol): Fix bug where
ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
ISOCBINDING_PTR.
2007-07-17 Janus Weil <jaydub66@gmail.com>
PR fortran/32535

View File

@ -3766,8 +3766,10 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
processing the file. */
generate_isocbinding_symbol
(mod_name, s == ISOCBINDING_FUNLOC
? ISOCBINDING_FUNPTR : ISOCBINDING_FUNPTR,
|| s == ISOCBINDING_F_PROCPOINTER
? ISOCBINDING_FUNPTR : ISOCBINDING_PTR,
(char *)(s == ISOCBINDING_FUNLOC
|| s == ISOCBINDING_F_PROCPOINTER
? "_gfortran_iso_c_binding_c_funptr"
: "_gfortran_iso_c_binding_c_ptr"));
tmp_sym->ts.derived =

View File

@ -1,3 +1,8 @@
2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
* gfortran.dg/pr32801.f03: New test case.
2007-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/c99-math-double-1.c: Mark test variables as volatile.

View File

@ -0,0 +1,6 @@
! { dg-do compile }
! Verify that C_PTR is auto generated because it's needed by C_LOC.
! This tests that PR 32801 is fixed.
PROGRAM c_loc_prob
USE, INTRINSIC :: ISO_C_BINDING, ONLY: C_LOC
END PROGRAM c_loc_prob