public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Jesus Diaz <jesusantonio30122016@gmail.com>
To: gcc-bugs@gcc.gnu.org
Subject: Weird struct behavior on ESA S390
Date: Thu, 26 Aug 2021 01:40:36 -0400	[thread overview]
Message-ID: <060f9635-14ed-ab93-496c-71ac6bb2cea0@gmail.com> (raw)

I was using 31-bit (with the -m31 flag) S390 cross-compiling with GCC 11.


When something weird happened:

https://github.com/udos-project/flatboot/blob/60046ae0d6cee23348359b7f94a312332a1357b2/stage2/stivale.c#L383


Here we can see the declaration of a struct, however when i declare the 
same struct (but in a function context) - the code below mishandles the 
given values (start_cc and start_hh) - if i use the declaration instead 
of making a struct in the function stack the start_cc and start_hh 
fields are correct (cc should never be above 100 (decimal) normally)


I think this is a bug because the structs have the same attributes and 
the same fields, with the same order... so their behaviour should not 
change?



             reply	other threads:[~2021-08-26  5:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  5:40 Jesus Diaz [this message]
2021-08-26  9:03 ` Jonathan Wakely

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

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

  git send-email \
    --in-reply-to=060f9635-14ed-ab93-496c-71ac6bb2cea0@gmail.com \
    --to=jesusantonio30122016@gmail.com \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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).