diff -Nrcpad gcc-4.3.1/gcc/ada/ChangeLog gcc-4.3.2/gcc/ada/ChangeLog *** gcc-4.3.1/gcc/ada/ChangeLog Fri Jun 6 14:28:20 2008 --- gcc-4.3.2/gcc/ada/ChangeLog Wed Aug 27 18:02:00 2008 *************** *** 1,3 **** --- 1,32 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + + 2008-06-24 Eric Botcazou + + * utils2.c (known_alignment): Derive the alignment from pointed-to + types only if it is otherwise unknown. + : Tidy. + : Likewise. + : If the alignment of the offset is unknown, use + that of the base. + + 2008-06-09 Eric Botcazou + + * decl.c (components_to_record): Adjust the packedness for the + qualified union as well. + + 2008-06-06 Aurelien Jarno + + * s-osinte-linux-alpha.ads (SC_NPROCESSORS_ONLN): New constant + for sysconf call. + (bit_field): New packed boolean type used by cpu_set_t. + (cpu_set_t): New type corresponding to the C type with + the same name. Note that on the Ada side we use a bit + field array for the affinity mask. There is not need + for the C macro for setting individual bit. + (pthread_setaffinity_np): New imported routine. + 2008-06-06 Release Manager * GCC 4.3.1 released. diff -Nrcpad gcc-4.3.1/gcc/ada/decl.c gcc-4.3.2/gcc/ada/decl.c *** gcc-4.3.1/gcc/ada/decl.c Wed Apr 9 16:25:28 2008 --- gcc-4.3.2/gcc/ada/decl.c Mon Jun 9 09:42:56 2008 *************** components_to_record (tree gnu_record_ty *** 6109,6114 **** --- 6109,6116 ---- /* Only make the QUAL_UNION_TYPE if there are any non-empty variants. */ if (gnu_variant_list) { + int union_field_packed; + if (all_rep_and_size) { TYPE_SIZE (gnu_union_type) = TYPE_SIZE (gnu_record_type); *************** components_to_record (tree gnu_record_ty *** 6130,6138 **** return; } gnu_union_field = create_field_decl (gnu_var_name, gnu_union_type, gnu_record_type, ! packed, all_rep ? TYPE_SIZE (gnu_union_type) : 0, all_rep ? bitsize_zero_node : 0, 0); --- 6132,6144 ---- return; } + /* Deal with packedness like in gnat_to_gnu_field. */ + union_field_packed + = adjust_packed (gnu_union_type, gnu_record_type, packed); + gnu_union_field = create_field_decl (gnu_var_name, gnu_union_type, gnu_record_type, ! union_field_packed, all_rep ? TYPE_SIZE (gnu_union_type) : 0, all_rep ? bitsize_zero_node : 0, 0); diff -Nrcpad gcc-4.3.1/gcc/ada/s-osinte-linux-alpha.ads gcc-4.3.2/gcc/ada/s-osinte-linux-alpha.ads *** gcc-4.3.1/gcc/ada/s-osinte-linux-alpha.ads Sun Nov 5 10:58:41 2006 --- gcc-4.3.2/gcc/ada/s-osinte-linux-alpha.ads Fri Jun 6 20:48:48 2008 *************** package System.OS_Interface is *** 237,242 **** --- 237,243 ---- pragma Import (C, sysconf); SC_CLK_TCK : constant := 2; + SC_NPROCESSORS_ONLN : constant := 84; ------------------------- -- Priority Scheduling -- *************** package System.OS_Interface is *** 268,273 **** --- 269,275 ---- type Thread_Body is access function (arg : System.Address) return System.Address; + pragma Convention (C, Thread_Body); function Thread_Body_Access is new Unchecked_Conversion (System.Address, Thread_Body); *************** package System.OS_Interface is *** 448,459 **** --- 450,480 ---- pragma Import (C, pthread_getspecific, "pthread_getspecific"); type destructor_pointer is access procedure (arg : System.Address); + pragma Convention (C, destructor_pointer); function pthread_key_create (key : access pthread_key_t; destructor : destructor_pointer) return int; pragma Import (C, pthread_key_create, "pthread_key_create"); + CPU_SETSIZE : constant := 1_024; + + type bit_field is array (1 .. CPU_SETSIZE) of Boolean; + for bit_field'Size use CPU_SETSIZE; + pragma Pack (bit_field); + pragma Convention (C, bit_field); + + type cpu_set_t is record + bits : bit_field; + end record; + pragma Convention (C, cpu_set_t); + + function pthread_setaffinity_np + (thread : pthread_t; + cpusetsize : size_t; + cpuset : access cpu_set_t) return int; + pragma Import (C, pthread_setaffinity_np, "__gnat_pthread_setaffinity_np"); + private type sigset_t is record diff -Nrcpad gcc-4.3.1/gcc/ada/utils2.c gcc-4.3.2/gcc/ada/utils2.c *** gcc-4.3.1/gcc/ada/utils2.c Mon Jan 21 12:05:13 2008 --- gcc-4.3.2/gcc/ada/utils2.c Tue Jun 24 18:15:56 2008 *************** known_alignment (tree exp) *** 136,158 **** { unsigned int this_alignment; unsigned int lhs, rhs; - unsigned int type_alignment; - - /* For pointer expressions, we know that the designated object is always at - least as strictly aligned as the designated subtype, so we account for - both type and expression information in this case. - - Beware that we can still get a dummy designated subtype here (e.g. Taft - Amendement types), in which the alignment information is meaningless and - should be ignored. - - We always compute a type_alignment value and return the MAX of it - compared with what we get from the expression tree. Just set the - type_alignment value to 0 when the type information is to be ignored. */ - type_alignment - = ((POINTER_TYPE_P (TREE_TYPE (exp)) - && !TYPE_IS_DUMMY_P (TREE_TYPE (TREE_TYPE (exp)))) - ? TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))) : 0); switch (TREE_CODE (exp)) { --- 136,141 ---- *************** known_alignment (tree exp) *** 171,177 **** break; case PLUS_EXPR: - case POINTER_PLUS_EXPR: case MINUS_EXPR: /* If two address are added, the alignment of the result is the minimum of the two alignments. */ --- 154,159 ---- *************** known_alignment (tree exp) *** 180,185 **** --- 162,178 ---- this_alignment = MIN (lhs, rhs); break; + case POINTER_PLUS_EXPR: + lhs = known_alignment (TREE_OPERAND (exp, 0)); + rhs = known_alignment (TREE_OPERAND (exp, 1)); + /* If we don't know the alignment of the offset, we assume that + of the base. */ + if (rhs == 0) + this_alignment = lhs; + else + this_alignment = MIN (lhs, rhs); + break; + case COND_EXPR: /* If there is a choice between two values, use the smallest one. */ lhs = known_alignment (TREE_OPERAND (exp, 1)); *************** known_alignment (tree exp) *** 188,199 **** break; case INTEGER_CST: ! /* The first part of this represents the lowest bit in the constant, ! but is it in bytes, not bits. */ ! this_alignment ! = MIN (BITS_PER_UNIT ! * (TREE_INT_CST_LOW (exp) & - TREE_INT_CST_LOW (exp)), ! BIGGEST_ALIGNMENT); break; case MULT_EXPR: --- 181,192 ---- break; case INTEGER_CST: ! { ! unsigned HOST_WIDE_INT c = TREE_INT_CST_LOW (exp); ! /* The first part of this represents the lowest bit in the constant, ! but it is originally in bytes, not bits. */ ! this_alignment = MIN (BITS_PER_UNIT * (c & -c), BIGGEST_ALIGNMENT); ! } break; case MULT_EXPR: *************** known_alignment (tree exp) *** 202,211 **** lhs = known_alignment (TREE_OPERAND (exp, 0)); rhs = known_alignment (TREE_OPERAND (exp, 1)); ! if (lhs == 0 || rhs == 0) ! this_alignment = MIN (BIGGEST_ALIGNMENT, MAX (lhs, rhs)); else ! this_alignment = MIN (BIGGEST_ALIGNMENT, lhs * rhs); break; case BIT_AND_EXPR: --- 195,206 ---- lhs = known_alignment (TREE_OPERAND (exp, 0)); rhs = known_alignment (TREE_OPERAND (exp, 1)); ! if (lhs == 0) ! this_alignment = rhs; ! else if (rhs == 0) ! this_alignment = lhs; else ! this_alignment = MIN (lhs * rhs, BIGGEST_ALIGNMENT); break; case BIT_AND_EXPR: *************** known_alignment (tree exp) *** 221,231 **** break; default: ! this_alignment = 0; break; } ! return MAX (type_alignment, this_alignment); } /* We have a comparison or assignment operation on two types, T1 and T2, --- 216,234 ---- break; default: ! /* For other pointer expressions, we assume that the pointed-to object ! is at least as aligned as the pointed-to type. Beware that we can ! have a dummy type here (e.g. a Taft Amendment type), for which the ! alignment is meaningless and should be ignored. */ ! if (POINTER_TYPE_P (TREE_TYPE (exp)) ! && !TYPE_IS_DUMMY_P (TREE_TYPE (TREE_TYPE (exp)))) ! this_alignment = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp))); ! else ! this_alignment = 0; break; } ! return this_alignment; } /* We have a comparison or assignment operation on two types, T1 and T2, diff -Nrcpad gcc-4.3.1/gnattools/ChangeLog gcc-4.3.2/gnattools/ChangeLog *** gcc-4.3.1/gnattools/ChangeLog Fri Jun 6 14:28:04 2008 --- gcc-4.3.2/gnattools/ChangeLog Wed Aug 27 18:04:07 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + 2008-06-06 Release Manager * GCC 4.3.1 released. diff -Nrcpad gcc-4.3.1/libada/ChangeLog gcc-4.3.2/libada/ChangeLog *** gcc-4.3.1/libada/ChangeLog Fri Jun 6 14:27:59 2008 --- gcc-4.3.2/libada/ChangeLog Wed Aug 27 18:03:40 2008 *************** *** 1,3 **** --- 1,7 ---- + 2008-08-27 Release Manager + + * GCC 4.3.2 released. + 2008-06-06 Release Manager * GCC 4.3.1 released.