are there any one day tours from madrid to rock of gibralter and morrocco
I don't think you can do both Gibraltar and Morocco in one day. And by Morocco I am assuming you only have your sights on Tangiers. Else, you have to go back to the drawing board if you thoughts include any other place in Morocco.
I agree that it might not be possible to do both in one day. If you are interested in Morocco then I would skip Gibraltar and do Tangiers for a day if that is all you can spare, but adding an overnite in Morocco would be best. I loved it and would return again. Spent three days and two nights and saw a lot.... One night in Tangiers, and one night in Chefchouean (the blue city) and also had a stop in Assilah (a beach town).
Did anyone read your question fully? No, I don't think that there are any ONE DAY tours from MADRID to Gibraltar or Morrocco. Unless you're on a tour with a private jet, the distances and amount of time necessary would be TOO great to even attempt this. Maybe a one day tour to Toledo or Segovia - but why would anyone go this far south for just the day?