[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#521622: marked as done (gdc-4.1: struct layout not the same as gcc on i386)



Your message dated 
with message-id <20100713184537.10815.90403.mass-bugs-close@merkel.debian.org>
and subject line gdc-4.1 removed from Debian unstable
has caused the Debian Bug report #521622,
regarding gdc-4.1: struct layout not the same as gcc on i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
521622: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521622
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gdc-4.1
Version: 0.25-4.1.2-23.2
Severity: normal

gdc on i386 inserts four bytes of padding in this struct (so that it's
total size is 16 bytes), while gcc doesn't:

struct test {
  int mode;
  double mu;
};

According to http://www.digitalmars.com/d/1.0/abi.html, structs should
conform "to the target's C ABI struct layout", so it looks like this
is a bug.

Two small test programs are attached.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/1 CPU core)
Locale: LANG=nl_BE.UTF-8, LC_CTYPE=nl_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdc-4.1 depends on:
ii  g++-4.1                  4.1.2-25        The GNU C++ compiler
ii  gcc-4.1-base             4.1.2-25        The GNU Compiler Collection (base 
ii  libc6                    2.9-6           GNU C Library: Shared libraries
ii  libgcc1                  1:4.3.3-5       GCC support library
ii  libphobos-4.1-dev        0.25-4.1.2-23.2 The phobos D standard library
ii  libstdc++6               4.3.3-5         The GNU Standard C++ Library v3

gdc-4.1 recommends no packages.

gdc-4.1 suggests no packages.

-- no debconf information
import std.stdio;

extern(C)
struct test {
  int mode;
  double mu;
};

void main()
{
  writefln("test.sizeof: ", test.sizeof);
  writefln("test.mode.offsetof: ", test.mode.offsetof);
  writefln("test.mu.offsetof: ", test.mu.offsetof);
}
#include <stdio.h>
#include <stddef.h>

struct test {
  int mode;
  double mu;
};

int main()
{
  printf("test.sizeof: %zd\n", sizeof(struct test));
  printf("test.mode.offsetof: %zd\n", offsetof(struct test, mode));
  printf("test.mu.offsetof: %zd\n", offsetof(struct test, mu));
  return 0;
}

--- End Message ---
--- Begin Message ---
Version: 0.25-20080616-4.1.2-27+rm

gdc-4.1 has been removed from Debian unstable: http://bugs.debian.org/577428

Closing its bugs with a Version higher than the last unstable upload.

More information about this script at:
  http://git.debian.org/?p=users/morph/mass-bugs-close.git;a=blob_plain;f=README;hb=HEAD


--- End Message ---

Reply to: