This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/7799: [3.2/3.3 regression] Loop bug withoptimization flag -Os in gcc


In fact the old test for gcc.c-torture/execute/loop-2e.c was using nmap
before I said something because I getting a PASS on i686-unknown-openbsd
when it was giving the same assembly as i686-pc-gnu-linux.

Thanks,
Andrew Pinski


On Friday, Dec 13, 2002, at 08:28 US/Pacific, Morten Welinder wrote:

Andreas Schwab writes:

"Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de> writes:
|> By calling fill ((int*) 0xffffffc, q);

Undefined behaviour.
True, but its_somewhere_in_my_libc() is not.  Implementation defined,
yes, but not undefined.

A quick scan of mmap's manual page suggests that it is not completely
ruled out that you would get 0xfffffffc for an area that includes
space for ten ints thereafter.  (Perhaps you would have to ask for
memory starting a bit earlier, namely at the start of a page.)

With PROT_NONE this would merely be absurd behaviour, IMHO, as opposed
to certifiably insane.

Morten








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]