unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: DJGPP only dumps with USE_LISP_UNION_TYPE ??
Date: Tue, 09 Nov 2004 11:25:22 +0100	[thread overview]
Message-ID: <41909B12.2060404@swipnet.se> (raw)
In-Reply-To: <01c4c619$Blat.v2.2.2$5f981160@zahav.net.il>

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

Eli Zaretskii wrote:

>>Emacs fatal error: buffer.c:4944: assertion failed: XTYPE 
>>(&buffer_defaults) == 0
>>
>>In gdb I see that &buffer_local_symbols which is what 
>>Vbuffer_local_symbols uses, isn't aligned to an even 8 either.  These 
>>are aligned to an even 4.  So DECL_ALIGN isn't working in this 
>>configuration (?).  Sounds strange.
> 
> 
> Could you write a short test program that demonstrates whether
> DECL_ALIGN works, and see if it fails on XP?  (I could run it on my
> machine to see if it works on 98, which I think it does.)  If
> DECL_ALIGN doesn't work, we certainly cannot use LSB tags in the XP
> build.  We could then make the test program part of config.bat to DTRT
> at build time.
> 
> Please also upgrade to a newer GCC version (I use 3.3.3), in case
> there's some alignment bug in your version.

Test program attached.  Output when compiling in Cygwin, Gnu/Linux or MacOSX 
is as expected:

ss1: rem 0
ss2: rem 0
ss3: rem 0
ss4: rem 0

but for djgpp (didn't find gcc 3.3.3, but 3.3.4):

D:\src>gcc -v
Reading specs from d:/djgpp/bin/../lib/gcc-lib/djgpp/3.34/specs
Configured with: /gcc/gnu/gcc-3.34/configure djgpp --prefix=/dev/env/DJDIR --dis
able-nls
Thread model: single
gcc version 3.3.4

D:\src>make align
gcc     align.c   -o align

D:\src>align
ss1: rem 4
ss2: rem 4
ss3: rem 4
ss4: rem 4

Very strange, considering Gnu/Linux and Cygwin are on the same machine.

	Jan D.


[-- Attachment #2: align.c --]
[-- Type: text/plain, Size: 600 bytes --]

#include <stdio.h>

#define GCTYPEBITS 3
#  define DECL_ALIGN(type, var) \
    type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var

struct SS
{
  char *ptr;
  long nr;
};


DECL_ALIGN (struct SS, ss1);
DECL_ALIGN (struct SS, ss2);
DECL_ALIGN (struct SS, ss3);
DECL_ALIGN (struct SS, ss4);

int
main ()
{
  int rem;

  rem = (unsigned long)&ss1 % 8;
  printf ("ss1: rem %d\n", rem);
  rem = (unsigned long)&ss2 % 8;
  printf ("ss2: rem %d\n", rem);
  rem = (unsigned long)&ss3 % 8;
  printf ("ss3: rem %d\n", rem);
  rem = (unsigned long)&ss4 % 8;
  printf ("ss4: rem %d\n", rem);

  return 0;
}

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2004-11-09 10:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-07 10:13 DJGPP only dumps with USE_LISP_UNION_TYPE ?? Jan D.
2004-11-07 10:50 ` Andreas Schwab
2004-11-07 12:02   ` Jan D.
2004-11-07 22:03     ` Eli Zaretskii
2004-11-07 21:56 ` Eli Zaretskii
2004-11-07 23:47   ` Jan D.
2004-11-08  8:10     ` Eli Zaretskii
2004-11-08 12:56       ` Eli Zaretskii
2004-11-08 16:44       ` Eli Zaretskii
2004-11-08 20:40       ` Jan D.
2004-11-09  5:01         ` Eli Zaretskii
2004-11-09 10:25           ` Jan D. [this message]
2004-11-09 14:17             ` Stefan
2004-11-09 17:28               ` Jan D.
2004-11-10  4:42                 ` Eli Zaretskii
2004-11-10  8:12                   ` Jan D.
2004-11-10 21:05                     ` Eli Zaretskii
2004-11-10  4:36             ` Eli Zaretskii
2004-11-12 18:23               ` Eli Zaretskii
2004-11-14 10:17                 ` Jan D.
2004-11-14 20:33                   ` Eli Zaretskii
2004-11-27 12:36                     ` Eli Zaretskii
2004-11-27 16:31                       ` Jan D.
2004-11-27 16:33                         ` Eli Zaretskii
2004-11-27 18:19                         ` Eli Zaretskii
2004-11-27 22:54                           ` Jan D.
2004-11-11 20:03             ` Eli Zaretskii
2004-11-08 15:15 ` Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41909B12.2060404@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).