public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56263] New: [avr] Provide strict address-space checking
@ 2013-02-09 10:30 gjl at gcc dot gnu.org
  2013-02-09 10:31 ` [Bug target/56263] " gjl at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: gjl at gcc dot gnu.org @ 2013-02-09 10:30 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56263

             Bug #: 56263
           Summary: [avr] Provide strict address-space checking
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: gjl@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
                CC: demiurg_spb@freemail.ru
            Target: avr


Created attachment 29401
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29401
Test case that shall error with strict address spaces

The intrinsic address spaces introduced with PR49868 are imlemented in such a
way that each address space is a subset of each other.

This allows code like follows to operate as expected and without warnings:

char read_char (const char *address, int data_in_flash)
{
    if (data_in_flash)
        return *(const __flash char*) address;
    else
        return *address;
}

Currently, targetm.addr_space_subset_p returns always true in order to allow
pointer casts like above without diagnostics.

avr.c:avr_addr_space_subset_p() could be implemented in such a way, that it
returns true iff the respective ASes are physical subsets of each other, and
not only if their address, regarded as number, are subsets.

In order not to change the current ABI, this can be achieved by a new command
line option like -maddr-space-subset that allows the user to pick the model of
his favor.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-20  5:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-09 10:30 [Bug target/56263] New: [avr] Provide strict address-space checking gjl at gcc dot gnu.org
2013-02-09 10:31 ` [Bug target/56263] " gjl at gcc dot gnu.org
2013-02-10 12:25 ` demiurg_spb at freemail dot ru
2013-02-11 15:10 ` gjl at gcc dot gnu.org
2013-02-11 15:10 ` gjl at gcc dot gnu.org
2013-02-12  6:48 ` demiurg_spb at freemail dot ru
2013-02-19 17:59 ` gjl at gcc dot gnu.org
2013-02-20  5:54 ` demiurg_spb at freemail dot ru
2013-03-12 11:42 ` gjl at gcc dot gnu.org
2013-03-12 21:21 ` gjl at gcc dot gnu.org
2013-03-13  6:46 ` demiurg_spb at freemail dot ru
2013-03-22 14:48 ` jakub at gcc dot gnu.org
2013-04-20  5:11 ` gjl at gcc dot gnu.org

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).