public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-20 12:33 ` enkovich.gnu at gmail dot com
  2014-11-20 12:54 ` rguenther at suse dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-20 12:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #1 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
What does "bootstrap with -fcheck-pointer-bounds -mmpx" mean?  Any instruction
on how to reproduce?


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
  2014-11-20 12:33 ` [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx enkovich.gnu at gmail dot com
@ 2014-11-20 12:54 ` rguenther at suse dot de
  2014-11-26 14:57 ` enkovich.gnu at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2014-11-20 12:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 20 Nov 2014, enkovich.gnu at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994
> 
> --- Comment #1 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
> What does "bootstrap with -fcheck-pointer-bounds -mmpx" mean?  Any instruction
> on how to reproduce?

> TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" TARGET_CXXFLAGS="-O2 
-g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g -mmpx 
-fcheck-pointer-bounds" /space/rguenther/src/svn/trunk/configure 
--enable-languages=all,obj-c++,ada,go
> make -j12  TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" 
TARGET_CXXFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g 
-mmpx -fcheck-pointer-bounds"


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
  2014-11-20 12:33 ` [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx enkovich.gnu at gmail dot com
  2014-11-20 12:54 ` rguenther at suse dot de
@ 2014-11-26 14:57 ` enkovich.gnu at gmail dot com
  2014-11-26 15:51 ` rguenther at suse dot de
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-26 14:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #3 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
(In reply to rguenther@suse.de from comment #2)
> 
> > TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" TARGET_CXXFLAGS="-O2 
> -g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g -mmpx 
> -fcheck-pointer-bounds" /space/rguenther/src/svn/trunk/configure 
> --enable-languages=all,obj-c++,ada,go
> > make -j12  TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" 
> TARGET_CXXFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g 
> -mmpx -fcheck-pointer-bounds"

Building with these options I see Ada compiler is called with
-fcheck-pointer-bounds.  Option is in c-family/c.opt and shouldn't be passed
for Ada compiler.  

We should either not pass CFLAGS for Ada during build or filter language in the
compiler.


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-11-26 14:57 ` enkovich.gnu at gmail dot com
@ 2014-11-26 15:51 ` rguenther at suse dot de
  2014-11-26 16:07 ` enkovich.gnu at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2014-11-26 15:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 26 Nov 2014, enkovich.gnu at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994
> 
> --- Comment #3 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
> (In reply to rguenther@suse.de from comment #2)
> > 
> > > TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" TARGET_CXXFLAGS="-O2 
> > -g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g -mmpx 
> > -fcheck-pointer-bounds" /space/rguenther/src/svn/trunk/configure 
> > --enable-languages=all,obj-c++,ada,go
> > > make -j12  TARGET_CFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" 
> > TARGET_CXXFLAGS="-O2 -g -mmpx -fcheck-pointer-bounds" BOOT_CFLAGS="-O2 -g 
> > -mmpx -fcheck-pointer-bounds"
> 
> Building with these options I see Ada compiler is called with
> -fcheck-pointer-bounds.  Option is in c-family/c.opt and shouldn't be passed
> for Ada compiler.  
> 
> We should either not pass CFLAGS for Ada during build or filter language in the
> compiler.

Any reason why non-C-family languages cannot use MPX?

Richard.


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-11-26 15:51 ` rguenther at suse dot de
@ 2014-11-26 16:07 ` enkovich.gnu at gmail dot com
  2014-11-27  9:32 ` rguenther at suse dot de
  2014-11-27  9:46 ` enkovich.gnu at gmail dot com
  6 siblings, 0 replies; 7+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-26 16:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #5 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
(In reply to rguenther@suse.de from comment #4)
> Any reason why non-C-family languages cannot use MPX?
> 
> Richard.

There is no fundamental restriction.  If someone wants to implement Pointer
Bounds Checker for some language, then he needs to define how it instruments
the program on that language and implement it in the compiler.  Currently it is
defined and implemented for C-languages only.


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-11-26 16:07 ` enkovich.gnu at gmail dot com
@ 2014-11-27  9:32 ` rguenther at suse dot de
  2014-11-27  9:46 ` enkovich.gnu at gmail dot com
  6 siblings, 0 replies; 7+ messages in thread
From: rguenther at suse dot de @ 2014-11-27  9:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 26 Nov 2014, enkovich.gnu at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994
> 
> --- Comment #5 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
> (In reply to rguenther@suse.de from comment #4)
> > Any reason why non-C-family languages cannot use MPX?
> > 
> > Richard.
> 
> There is no fundamental restriction.  If someone wants to implement 
> Pointer Bounds Checker for some language, then he needs to define how it 
> instruments the program on that language and implement it in the 
> compiler.  Currently it is defined and implemented for C-languages only.

I see.  I mainly wonder because of LTO which can combine TUs from C
and Ada and because for example both Fortran and Ada define
interoperability with C.  All languages also share the common
C runtime builtins.

Richard.


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

* [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx
       [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2014-11-27  9:32 ` rguenther at suse dot de
@ 2014-11-27  9:46 ` enkovich.gnu at gmail dot com
  6 siblings, 0 replies; 7+ messages in thread
From: enkovich.gnu at gmail dot com @ 2014-11-27  9:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63994

--- Comment #7 from Ilya Enkovich <enkovich.gnu at gmail dot com> ---
(In reply to rguenther@suse.de from comment #6)
> I see.  I mainly wonder because of LTO which can combine TUs from C
> and Ada and because for example both Fortran and Ada define
> interoperability with C.  All languages also share the common
> C runtime builtins.
> 
> Richard.

It should be OK to mix instrumented and not instrumented codes. 
Instrumentation happens in early passes before LTO streams out.  Therefore we
can compile C file with '-fcheck-pointer-bounds -mmpx -flto -c', then compile
fortran (or any other) file with '-c -flto' and finally pass generated objects
to LTO.  It may be inconvenient to avoid '-fcheck-pointer-bounds' for nonc-C
files when you work with mixed codes.  To handle it I may use langhooks and
ignore '-fcheck-pointer-bounds' when it's not supported for used language.


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

end of thread, other threads:[~2014-11-27  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-63994-4@http.gcc.gnu.org/bugzilla/>
2014-11-20 12:33 ` [Bug middle-end/63994] Ada bootstrap fails with -fcheck-pointer-bounds -mmpx enkovich.gnu at gmail dot com
2014-11-20 12:54 ` rguenther at suse dot de
2014-11-26 14:57 ` enkovich.gnu at gmail dot com
2014-11-26 15:51 ` rguenther at suse dot de
2014-11-26 16:07 ` enkovich.gnu at gmail dot com
2014-11-27  9:32 ` rguenther at suse dot de
2014-11-27  9:46 ` enkovich.gnu at gmail dot com

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