2012-05-04  Paolo Carlini  <paolo.carlini@oracle.com>

    	* semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): Tidy.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187184 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187188 138bc75d-0d04-0410-961f-82ee72b054a4
Fix handling of temporary files.

2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

        * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
        algorithm for choosing temp directory.


2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

        * config.h.in: Regenerated.
        * configure: Regenerated.
        * configure.ac: Add checks for getegid and __secure_getenv.
        * io/unix.c (P_tmpdir): Fallback definition for macro.
        (tempfile_open): New function.
        (tempfile): Use secure_getenv, call tempfile_open to try each
        directory in turn.
        * libgfortran.h (DEFAULT_TMPDIR): Remove macro.
        (secure_getenv): New macro/prototype.
        * runtime/environ.c (secure_getenv): New function.
        (variable_table): Rename GFORTRAN_TMPDIR to TMPDIR.
        * runtime/main.c (find_addr2line): Use secure_getenv.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187190 138bc75d-0d04-0410-961f-82ee72b054a4
PR 49010,24518 MOD/MODULO fixes.

gcc/fortran:

2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/49010
	PR fortran/24518
	* intrinsic.texi (MOD, MODULO): Mention sign and magnitude of result.
	* simplify.c (gfc_simplify_mod): Use mpfr_fmod.
	(gfc_simplify_modulo): Likewise, use copysign to fix the result if
	zero.
	* trans-intrinsic.c (gfc_conv_intrinsic_mod): Remove fallback as
	builtin_fmod is always available. For modulo, call copysign to fix
	the result when signed zeros are enabled.


testsuite:

2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/49010
	PR fortran/24518
	* gfortran.dg/mod_sign0_1.f90: New test.
	* gfortran.dg/mod_large_1.f90: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187191 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/41600
	* trans-array.c (build_array_ref): New static function.
	(gfc_conv_array_ref, gfc_get_dataptr_offset): Call it.
	* trans-expr.c (gfc_get_vptr_from_expr): New function.
	(gfc_conv_derived_to_class): Add a new argument for a caller
	supplied vptr and use it if it is not NULL.
	(gfc_conv_procedure_call): Add NULL to call to above.
	symbol.c (gfc_is_associate_pointer): Return true if symbol is
	a class object.
	* trans-stmt.c (trans_associate_var): Handle class associate-
	names.
	* expr.c (gfc_get_variable_expr): Supply the array-spec if
	possible.
	* trans-types.c (gfc_typenode_for_spec): Set GFC_CLASS_TYPE_P
	for class types.
	* trans.h : Add prototypes for gfc_get_vptr_from_expr and
	gfc_conv_derived_to_class. Define GFC_CLASS_TYPE_P.
	* resolve.c (resolve_variable): For class arrays, ensure that
	the target expression has all the necessary _data references.
	(resolve_assoc_var): Throw a "not yet implemented" error for
	class array selectors that need a temporary.
	* match.c (copy_ts_from_selector_to_associate,
	select_derived_set_tmp, select_class_set_tmp): New functions.
	(select_type_set_tmp): Call one of last two new functions.
	(gfc_match_select_type): Copy_ts_from_selector_to_associate is
	called if associate-name is typed.

	PR fortran/53191
	* resolve.c (resolve_ref): C614 applied to class expressions.


2012-05-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/41600
	* gfortran.dg/select_type_26.f03 : New test.
	* gfortran.dg/select_type_27.f03 : New test.

	PR fortran/53191
	* gfortran.dg/select_type_28.f03 : New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187192 138bc75d-0d04-0410-961f-82ee72b054a4