Commit 4bbed9ce by Dominik Vogt Committed by Ian Lance Taylor

godump.c (precision_to_units): New helper function.

gcc/:
        * godump.c (precision_to_units): New helper function.
        (go_append_artificial_name): Ditto.
        (go_append_decl_name): Ditto.
        (go_append_bitfield): Ditto.
        (go_get_uinttype_for_precision): Ditto.
        (go_append_padding): Ditto.
        (go_force_record_alignment): Ditto.
        (go_format_type): Represent unions with an array of uints of the size
        of the alignment in go.  This fixes the 'random' size of the union's
        representation using just the first field.
        (go_format_type): Add argument that indicates whether a record is
        nested (used for generation of artificial go names).
        (go_output_fndecl): Adapt to new go_format_type signature.
        (go_output_typedef): Ditto.
        (go_output_var): Ditto.
        (go_output_var): Prefer to output type as alias (typedef).
        (go_format_type): Bitfields in records are simulated as arrays of bytes
        in go.

        * godump.c (go_format_type): Fix handling of arrays with zero elements.
gcc/testsuite/:
        * gcc.misc-tests/godump.exp: New.
        * gcc.misc-tests/godump-1.c: New.

From-SVN: r216806
parent c582198b
2014-10-28 Dominik Vogt <vogt@linux.vnet.ibm.com>
* godump.c (precision_to_units): New helper function.
(go_append_artificial_name): Ditto.
(go_append_decl_name): Ditto.
(go_append_bitfield): Ditto.
(go_get_uinttype_for_precision): Ditto.
(go_append_padding): Ditto.
(go_force_record_alignment): Ditto.
(go_format_type): Represent unions with an array of uints of the size
of the alignment in go. This fixes the 'random' size of the union's
representation using just the first field.
(go_format_type): Add argument that indicates whether a record is
nested (used for generation of artificial go names).
(go_output_fndecl): Adapt to new go_format_type signature.
(go_output_typedef): Ditto.
(go_output_var): Ditto.
(go_output_var): Prefer to output type as alias (typedef).
(go_format_type): Bitfields in records are simulated as arrays of bytes
in go.
* godump.c (go_format_type): Fix handling of arrays with zero elements.
2014-10-28 Andrew MacLeod <amacleod@redhat.com> 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
* cgraph.h: Flatten. Remove all include files. * cgraph.h: Flatten. Remove all include files.
2014-10-28 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.misc-tests/godump.exp: New.
* gcc.misc-tests/godump-1.c: New.
2014-10-28 Max Ostapenko <m.ostapenko@partner.samsung.com> 2014-10-28 Max Ostapenko <m.ostapenko@partner.samsung.com>
* c-c++-common/asan/no-redundant-instrumentation-1.c: Updated test. * c-c++-common/asan/no-redundant-instrumentation-1.c: Updated test.
......
# Copyright (C) 2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
# GCC testsuite that uses the `dg.exp' driver.
# Load support procs.
load_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
set DEFAULT_CFLAGS " -ansi -pedantic-errors"
}
# Initialize `dg'.
dg-init
# Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/godump-*.c]] \
"" $DEFAULT_CFLAGS
# All done.
dg-finish
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment